diff --git a/.github/workflows/cli-v1.yml b/.github/workflows/cli-v1.yml index cbdc8415fb..b6dd4c82d5 100644 --- a/.github/workflows/cli-v1.yml +++ b/.github/workflows/cli-v1.yml @@ -42,6 +42,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.github/workflows/cli-v2.yml b/.github/workflows/cli-v2.yml index bf89d35fb9..edf752987e 100644 --- a/.github/workflows/cli-v2.yml +++ b/.github/workflows/cli-v2.yml @@ -42,6 +42,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.github/workflows/forester-tests.yml b/.github/workflows/forester-tests.yml index 934db1784c..635cff83f5 100644 --- a/.github/workflows/forester-tests.yml +++ b/.github/workflows/forester-tests.yml @@ -63,6 +63,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build @@ -104,6 +106,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.github/workflows/js-v2.yml b/.github/workflows/js-v2.yml index a63c74f5fa..024b0dd64c 100644 --- a/.github/workflows/js-v2.yml +++ b/.github/workflows/js-v2.yml @@ -42,6 +42,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index da5d427086..e9a00443a1 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -42,6 +42,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 616041ce85..f855781270 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,6 +25,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.github/workflows/programs.yml b/.github/workflows/programs.yml index 9cce8303e0..59ea010058 100644 --- a/.github/workflows/programs.yml +++ b/.github/workflows/programs.yml @@ -67,6 +67,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 00a549a781..540f2a3f3f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -59,6 +59,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index 482b9edabc..c7b6f542d8 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -60,6 +60,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v6 + with: + submodules: true - name: Setup and build uses: ./.github/actions/setup-and-build diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..3d09b3cb7d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "external/photon"] + path = external/photon + url = git@github.com:Lightprotocol/photon.git diff --git a/Cargo.lock b/Cargo.lock index 25d90546f4..f21e3e91f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -188,7 +188,7 @@ version = "1.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -686,7 +686,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -712,7 +712,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -787,7 +787,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -868,6 +868,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "assert-json-diff" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -923,7 +933,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -949,6 +959,28 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "aws-lc-rs" +version = "1.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c34dda4df7017c8db52132f0f8a2e0f8161649d15723ed63fc00c82d0f2081a" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "base64" version = "0.12.3" @@ -1131,7 +1163,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1225,7 +1257,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1300,7 +1332,7 @@ checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1373,7 +1405,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1428,6 +1460,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "cmake" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +dependencies = [ + "cc", +] + [[package]] name = "colorchoice" version = "1.0.4" @@ -1787,7 +1828,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1811,7 +1852,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1822,7 +1863,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1858,6 +1899,24 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" +[[package]] +name = "deadpool" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0be2b1d1d6ec8d846f05e137292d0b89133caf95ef33695424c09568bdd39b1b" +dependencies = [ + "deadpool-runtime", + "lazy_static", + "num_cpus", + "tokio", +] + +[[package]] +name = "deadpool-runtime" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" + [[package]] name = "der-parser" version = "8.2.0" @@ -1879,7 +1938,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", - "serde_core", ] [[package]] @@ -1981,7 +2039,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2004,7 +2062,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2013,6 +2071,12 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.20" @@ -2096,7 +2160,7 @@ dependencies = [ "enum-ordinalize 4.3.2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2137,7 +2201,7 @@ checksum = "685adfa4d6f3d765a26bc5dbc936577de9abf756c1feeb3089b01dd395034842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2150,7 +2214,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2170,7 +2234,7 @@ checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2358,6 +2422,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "foreign-types" version = "0.3.2" @@ -2433,7 +2503,7 @@ dependencies = [ "solana-rpc-client-api", "solana-sdk", "solana-transaction-status", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "tracing-appender", @@ -2471,7 +2541,7 @@ dependencies = [ "solana-instruction", "solana-pubkey 2.4.0", "solana-sdk", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -2485,6 +2555,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "funty" version = "2.0.0" @@ -2547,7 +2623,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2722,7 +2798,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.12.1", + "indexmap", "slab", "tokio", "tokio-util 0.7.17", @@ -2741,7 +2817,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.4.0", - "indexmap 2.12.1", + "indexmap", "slab", "tokio", "tokio-util 0.7.17", @@ -2757,12 +2833,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.13.2" @@ -2786,7 +2856,7 @@ checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.1.5", ] [[package]] @@ -2794,6 +2864,11 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] [[package]] name = "headers" @@ -3244,20 +3319,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown 0.16.1", @@ -3372,7 +3436,7 @@ checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -3409,9 +3473,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -3561,7 +3625,7 @@ dependencies = [ "solana-pubkey 2.4.0", "solana-system-interface 1.0.0", "solana-sysvar", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -3627,7 +3691,7 @@ dependencies = [ "solana-program-error 2.2.2", "solana-pubkey 2.4.0", "solana-sysvar", - "thiserror 2.0.17", + "thiserror 2.0.18", "zerocopy", ] @@ -3642,7 +3706,7 @@ dependencies = [ "rand 0.8.5", "solana-nostd-keccak", "solana-program-error 2.2.2", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -3710,7 +3774,7 @@ dependencies = [ "solana-transaction-status-client-types", "spl-pod", "spl-token-2022-interface", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -3736,7 +3800,7 @@ dependencies = [ "solana-msg 2.2.1", "solana-program-error 2.2.2", "solana-pubkey 2.4.0", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "zerocopy", ] @@ -3800,7 +3864,7 @@ dependencies = [ "solana-msg 2.2.1", "solana-program-error 2.2.2", "solana-pubkey 2.4.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -3826,7 +3890,7 @@ dependencies = [ "solana-pubkey 2.4.0", "solana-rent", "solana-sysvar", - "thiserror 2.0.17", + "thiserror 2.0.18", "zerocopy", ] @@ -3847,7 +3911,7 @@ dependencies = [ "pinocchio", "rand 0.8.5", "solana-program-error 2.2.2", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", ] @@ -3861,7 +3925,7 @@ dependencies = [ "light-token-interface", "light-zero-copy", "rand 0.8.5", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -3875,7 +3939,7 @@ dependencies = [ "num-traits", "rand 0.8.5", "solana-program-error 2.2.2", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -3893,7 +3957,7 @@ dependencies = [ "sha3", "solana-program-error 2.2.2", "solana-pubkey 2.4.0", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "zerocopy", ] @@ -3913,7 +3977,7 @@ dependencies = [ "num-bigint 0.4.6", "num-traits", "rand 0.8.5", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -3930,7 +3994,7 @@ dependencies = [ "pinocchio", "rand 0.8.5", "solana-program-error 2.2.2", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -3960,7 +4024,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -3971,7 +4035,7 @@ dependencies = [ "proc-macro2", "quote", "solana-pubkey 2.4.0", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -3986,7 +4050,7 @@ dependencies = [ "solana-msg 2.2.1", "solana-program-error 2.2.2", "solana-sysvar", - "thiserror 2.0.17", + "thiserror 2.0.18", "zerocopy", ] @@ -3999,7 +4063,7 @@ dependencies = [ "num-bigint 0.4.6", "num-traits", "rand 0.8.5", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4034,7 +4098,7 @@ checksum = "0a8be18fe4de58a6f754caa74a3fbc6d8a758a26f1f3c24d5b0f5b55df5f5408" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4126,7 +4190,7 @@ dependencies = [ "serde_json", "serial_test", "solana-bn254", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -4187,7 +4251,7 @@ dependencies = [ "solana-pubkey 2.4.0", "solana-system-interface 1.0.0", "solana-sysvar", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4208,7 +4272,7 @@ dependencies = [ "quote", "rand 0.8.5", "solana-pubkey 2.4.0", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4224,7 +4288,7 @@ dependencies = [ "light-sdk-macros", "light-sdk-types", "pinocchio", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4243,7 +4307,7 @@ dependencies = [ "solana-msg 2.2.1", "solana-program-error 2.2.2", "solana-pubkey 2.4.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4256,7 +4320,7 @@ dependencies = [ "num-bigint 0.4.6", "num-traits", "rand 0.8.5", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4297,7 +4361,7 @@ dependencies = [ "solana-msg 2.2.1", "solana-pubkey 2.4.0", "solana-security-txt", - "thiserror 2.0.17", + "thiserror 2.0.18", "zerocopy", ] @@ -4354,7 +4418,7 @@ dependencies = [ "spl-pod", "spl-token 7.0.0", "spl-token-2022 7.0.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4387,7 +4451,7 @@ dependencies = [ "solana-program-error 2.2.2", "solana-pubkey 2.4.0", "spl-pod", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4445,7 +4509,7 @@ dependencies = [ "spl-pod", "spl-token-2022 7.0.0", "spl-token-metadata-interface 0.6.0", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "zerocopy", ] @@ -4475,7 +4539,7 @@ dependencies = [ "light-macros", "light-sdk-types", "solana-msg 2.2.1", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4487,7 +4551,7 @@ dependencies = [ "pinocchio", "solana-msg 2.2.1", "solana-program-error 2.2.2", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4511,7 +4575,7 @@ dependencies = [ "proc-macro2", "quote", "rand 0.8.5", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4537,7 +4601,7 @@ dependencies = [ "agave-reserved-account-keys", "ansi_term", "bincode", - "indexmap 2.12.1", + "indexmap", "itertools 0.14.0", "log", "solana-account", @@ -4586,7 +4650,7 @@ dependencies = [ "solana-transaction-context", "solana-transaction-error", "solana-vote-program", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4844,7 +4908,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4917,7 +4981,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4953,6 +5017,17 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openapiv3" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8d427828b22ae1fff2833a03d8486c2c881367f1c336349f307f321e7f4d05" +dependencies = [ + "indexmap", + "serde", + "serde_json", +] + [[package]] name = "openssl" version = "0.10.75" @@ -4976,7 +5051,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5124,13 +5199,17 @@ dependencies = [ name = "photon-api" version = "0.54.0" dependencies = [ - "reqwest 0.12.26", + "openapiv3", + "prettyplease", + "progenitor", + "progenitor-client", + "reqwest 0.13.2", "serde", - "serde_derive", "serde_json", - "serde_with", - "url", - "uuid", + "serde_yaml", + "syn 2.0.114", + "tokio", + "wiremock", ] [[package]] @@ -5150,7 +5229,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5367,7 +5446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5407,18 +5486,84 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] +[[package]] +name = "progenitor" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdc8cf6196a0139ab7b833b500f7f1acd005c91be0fe27a9e20112bf83dc9535" +dependencies = [ + "progenitor-client", + "progenitor-impl", + "progenitor-macro", +] + +[[package]] +name = "progenitor-client" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffab7b358944dba033a7b324e7558e66e6bcb1fb4705cf57f26fd5092bcae630" +dependencies = [ + "bytes", + "futures-core", + "percent-encoding", + "reqwest 0.13.2", + "serde", + "serde_json", + "serde_urlencoded", +] + +[[package]] +name = "progenitor-impl" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea21f106f8345d4417f3a39c90e4ff826ea777cb51579d72165d380a4d6f685d" +dependencies = [ + "heck 0.5.0", + "http 1.4.0", + "indexmap", + "openapiv3", + "proc-macro2", + "quote", + "regex", + "schemars", + "serde", + "serde_json", + "syn 2.0.114", + "thiserror 2.0.18", + "typify", + "unicode-ident", +] + +[[package]] +name = "progenitor-macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c16f9cab95e07c5e6995db8d69d86e7472688b3deedb23e52631e398fddc2470" +dependencies = [ + "openapiv3", + "proc-macro2", + "progenitor-impl", + "quote", + "schemars", + "serde", + "serde_json", + "serde_tokenstream", + "serde_yaml", + "syn 2.0.114", +] + [[package]] name = "prometheus" version = "0.14.0" @@ -5431,7 +5576,7 @@ dependencies = [ "memchr", "parking_lot", "protobuf", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -5490,7 +5635,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5528,7 +5673,7 @@ dependencies = [ "rustc-hash 2.1.1", "rustls 0.23.35", "socket2 0.6.1", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "web-time", @@ -5540,6 +5685,7 @@ version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ + "aws-lc-rs", "bytes", "fastbloom", "getrandom 0.3.4", @@ -5551,7 +5697,7 @@ dependencies = [ "rustls-pki-types", "rustls-platform-verifier", "slab", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "tracing", "web-time", @@ -5573,9 +5719,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.42" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -5758,27 +5904,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.16", "libredox", - "thiserror 2.0.17", -] - -[[package]] -name = "ref-cast" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", + "thiserror 2.0.18", ] [[package]] @@ -5839,6 +5965,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "regress" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2057b2325e68a893284d1538021ab90279adac1139957ca2a74426c6f118fb48" +dependencies = [ + "hashbrown 0.16.1", + "memchr", +] + [[package]] name = "reqwest" version = "0.11.27" @@ -5906,7 +6042,6 @@ dependencies = [ "js-sys", "log", "mime", - "mime_guess", "native-tls", "percent-encoding", "pin-project-lite", @@ -5930,6 +6065,47 @@ dependencies = [ "webpki-roots 1.0.4", ] +[[package]] +name = "reqwest" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.8.1", + "hyper-rustls 0.27.7", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.35", + "rustls-pki-types", + "rustls-platform-verifier", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tokio-rustls 0.26.4", + "tokio-util 0.7.17", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + [[package]] name = "reqwest-middleware" version = "0.4.2" @@ -6047,6 +6223,7 @@ version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" dependencies = [ + "aws-lc-rs", "once_cell", "ring", "rustls-pki-types", @@ -6129,6 +6306,7 @@ version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -6187,26 +6365,28 @@ dependencies = [ [[package]] name = "schemars" -version = "0.9.0" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" dependencies = [ + "chrono", "dyn-clone", - "ref-cast", + "schemars_derive", "serde", "serde_json", + "uuid", ] [[package]] -name = "schemars" -version = "1.1.0" +name = "schemars_derive" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" dependencies = [ - "dyn-clone", - "ref-cast", - "serde", - "serde_json", + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.114", ] [[package]] @@ -6447,6 +6627,10 @@ name = "semver" version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +dependencies = [ + "serde", + "serde_core", +] [[package]] name = "serde" @@ -6494,20 +6678,31 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", ] [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -6528,6 +6723,18 @@ dependencies = [ "serde_core", ] +[[package]] +name = "serde_tokenstream" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 2.0.114", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -6546,17 +6753,8 @@ version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.12.1", - "schemars 0.9.0", - "schemars 1.1.0", "serde_core", - "serde_json", "serde_with_macros", - "time", ] [[package]] @@ -6568,7 +6766,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -6577,7 +6775,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.12.1", + "indexmap", "itoa", "ryu", "serde", @@ -6606,7 +6804,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -6959,7 +7157,7 @@ dependencies = [ "spl-token-2022 8.0.1", "spl-token-group-interface 0.6.0", "spl-token-metadata-interface 0.7.0", - "thiserror 2.0.17", + "thiserror 2.0.18", "zstd", ] @@ -7074,7 +7272,7 @@ dependencies = [ "solana-transaction-context", "solana-transaction-error", "tarpc", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-serde", ] @@ -7146,7 +7344,7 @@ dependencies = [ "ark-serialize 0.4.2", "bytemuck", "solana-define-syscall 2.3.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -7202,7 +7400,7 @@ dependencies = [ "solana-timings", "solana-transaction-context", "solana-type-overrides", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -7268,7 +7466,7 @@ dependencies = [ "solana-seed-phrase", "solana-signature", "solana-signer", - "thiserror 2.0.17", + "thiserror 2.0.18", "tiny-bip39", "uriparse", "url", @@ -7343,7 +7541,7 @@ dependencies = [ "dashmap 5.5.3", "futures", "futures-util", - "indexmap 2.12.1", + "indexmap", "indicatif", "log", "quinn", @@ -7374,7 +7572,7 @@ dependencies = [ "solana-transaction", "solana-transaction-error", "solana-udp-client", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", ] @@ -7461,7 +7659,7 @@ dependencies = [ "solana-sdk-ids", "solana-svm-transaction", "solana-transaction-error", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -7509,7 +7707,7 @@ dependencies = [ "bincode", "crossbeam-channel", "futures-util", - "indexmap 2.12.1", + "indexmap", "log", "rand 0.8.5", "rayon", @@ -7518,7 +7716,7 @@ dependencies = [ "solana-metrics", "solana-time-utils", "solana-transaction-error", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", ] @@ -7547,7 +7745,7 @@ dependencies = [ "curve25519-dalek 4.1.3", "solana-define-syscall 2.3.0", "subtle", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -7674,7 +7872,7 @@ dependencies = [ "solana-pubkey 2.4.0", "solana-sdk-ids", "solana-system-interface 1.0.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -8031,7 +8229,7 @@ dependencies = [ "solana-cluster-type", "solana-sha256-hasher 2.3.0", "solana-time-utils", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -8201,7 +8399,7 @@ dependencies = [ "ark-bn254 0.4.0", "light-poseidon 0.2.0", "solana-define-syscall 2.3.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -8318,7 +8516,7 @@ dependencies = [ "solana-sysvar", "solana-sysvar-id", "solana-vote-interface", - "thiserror 2.0.17", + "thiserror 2.0.18", "wasm-bindgen", ] @@ -8421,7 +8619,7 @@ dependencies = [ "solana-timings", "solana-transaction-context", "solana-type-overrides", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -8479,7 +8677,7 @@ dependencies = [ "solana-pubkey 2.4.0", "solana-rpc-client-types", "solana-signature", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-tungstenite", @@ -8513,7 +8711,7 @@ dependencies = [ "solana-streamer", "solana-tls-utils", "solana-transaction-error", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", ] @@ -8555,7 +8753,7 @@ dependencies = [ "solana-pubkey 2.4.0", "solana-signature", "solana-signer", - "thiserror 2.0.17", + "thiserror 2.0.18", "uriparse", ] @@ -8680,7 +8878,7 @@ dependencies = [ "solana-signer", "solana-transaction-error", "solana-transaction-status-client-types", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -8697,7 +8895,7 @@ dependencies = [ "solana-pubkey 2.4.0", "solana-rpc-client", "solana-sdk-ids", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -8723,7 +8921,7 @@ dependencies = [ "solana-transaction-status-client-types", "solana-version", "spl-generic-token", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -8751,7 +8949,7 @@ dependencies = [ "log", "rand 0.8.5", "rustc-demangle", - "thiserror 2.0.17", + "thiserror 2.0.18", "winapi", ] @@ -8822,7 +9020,7 @@ dependencies = [ "solana-transaction-context", "solana-transaction-error", "solana-validator-exit", - "thiserror 2.0.17", + "thiserror 2.0.18", "wasm-bindgen", ] @@ -8844,7 +9042,7 @@ dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -8875,7 +9073,7 @@ dependencies = [ "borsh 1.6.0", "libsecp256k1", "solana-define-syscall 2.3.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -9118,7 +9316,7 @@ dependencies = [ "futures-util", "governor 0.6.3", "histogram", - "indexmap 2.12.1", + "indexmap", "itertools 0.12.1", "libc", "log", @@ -9145,7 +9343,7 @@ dependencies = [ "solana-tls-utils", "solana-transaction-error", "solana-transaction-metrics-tracker", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-util 0.7.17", "x509-parser", @@ -9367,7 +9565,7 @@ dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 2.12.1", + "indexmap", "indicatif", "log", "rayon", @@ -9388,7 +9586,7 @@ dependencies = [ "solana-signer", "solana-transaction", "solana-transaction-error", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", ] @@ -9505,7 +9703,7 @@ dependencies = [ "spl-token-2022 8.0.1", "spl-token-group-interface 0.6.0", "spl-token-metadata-interface 0.7.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -9528,7 +9726,7 @@ dependencies = [ "solana-transaction", "solana-transaction-context", "solana-transaction-error", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -9552,7 +9750,7 @@ dependencies = [ "solana-net-utils", "solana-streamer", "solana-transaction-error", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", ] @@ -9632,7 +9830,7 @@ dependencies = [ "solana-transaction", "solana-transaction-context", "solana-vote-interface", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -9683,7 +9881,7 @@ dependencies = [ "solana-signature", "solana-signer", "subtle", - "thiserror 2.0.17", + "thiserror 2.0.18", "wasm-bindgen", "zeroize", ] @@ -9736,7 +9934,7 @@ dependencies = [ "solana-signature", "solana-signer", "subtle", - "thiserror 2.0.17", + "thiserror 2.0.18", "zeroize", ] @@ -9778,7 +9976,7 @@ dependencies = [ "spl-associated-token-account-client", "spl-token 8.0.0", "spl-token-2022 8.0.1", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -9811,7 +10009,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -9823,7 +10021,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.111", + "syn 2.0.114", "thiserror 1.0.69", ] @@ -9904,7 +10102,7 @@ dependencies = [ "solana-program-option", "solana-pubkey 2.4.0", "solana-zk-sdk", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -9932,7 +10130,7 @@ dependencies = [ "solana-msg 2.2.1", "solana-program-error 2.2.2", "spl-program-error-derive 0.5.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -9944,7 +10142,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -9956,7 +10154,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -10000,7 +10198,7 @@ dependencies = [ "spl-pod", "spl-program-error 0.7.0", "spl-type-length-value 0.8.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10043,7 +10241,7 @@ dependencies = [ "solana-rent", "solana-sdk-ids", "solana-sysvar", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10099,7 +10297,7 @@ dependencies = [ "spl-token-metadata-interface 0.6.0", "spl-transfer-hook-interface 0.9.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10143,7 +10341,7 @@ dependencies = [ "spl-token-metadata-interface 0.7.0", "spl-transfer-hook-interface 0.10.0", "spl-type-length-value 0.8.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10173,7 +10371,7 @@ dependencies = [ "spl-token-group-interface 0.6.0", "spl-token-metadata-interface 0.7.0", "spl-type-length-value 0.8.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10211,7 +10409,7 @@ dependencies = [ "solana-program", "solana-zk-sdk", "spl-pod", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10231,7 +10429,7 @@ dependencies = [ "solana-sdk-ids", "solana-zk-sdk", "spl-pod", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10251,7 +10449,7 @@ dependencies = [ "solana-sdk-ids", "solana-zk-sdk", "spl-pod", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10273,7 +10471,7 @@ checksum = "0e3597628b0d2fe94e7900fd17cdb4cfbb31ee35c66f82809d27d86e44b2848b" dependencies = [ "curve25519-dalek 4.1.3", "solana-zk-sdk", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10284,7 +10482,7 @@ checksum = "fa27b9174bea869a7ebf31e0be6890bce90b1a4288bc2bbf24bd413f80ae3fde" dependencies = [ "curve25519-dalek 4.1.3", "solana-zk-sdk", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10322,7 +10520,7 @@ dependencies = [ "solana-pubkey 2.4.0", "spl-discriminator", "spl-pod", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10364,7 +10562,7 @@ dependencies = [ "spl-discriminator", "spl-pod", "spl-type-length-value 0.8.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10414,7 +10612,7 @@ dependencies = [ "spl-program-error 0.7.0", "spl-tlv-account-resolution 0.10.0", "spl-type-length-value 0.8.0", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10450,7 +10648,7 @@ dependencies = [ "solana-program-error 2.2.2", "spl-discriminator", "spl-pod", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -10496,9 +10694,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.111" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", @@ -10540,7 +10738,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -10697,7 +10895,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -10798,11 +10996,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -10813,18 +11011,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -10952,7 +11150,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -11082,7 +11280,7 @@ version = "0.9.9+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb5238e643fc34a1d5d7e753e1532a91912d74b63b92b3ea51fde8d1b7bc79dd" dependencies = [ - "indexmap 2.12.1", + "indexmap", "serde_core", "serde_spanned 1.0.4", "toml_datetime 0.7.4+spec-1.0.0", @@ -11115,7 +11313,7 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.12.1", + "indexmap", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.11", @@ -11129,7 +11327,7 @@ version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ - "indexmap 2.12.1", + "indexmap", "toml_datetime 0.7.4+spec-1.0.0", "toml_parser", "winnow", @@ -11225,7 +11423,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" dependencies = [ "crossbeam-channel", - "thiserror 2.0.17", + "thiserror 2.0.18", "time", "tracing-subscriber", ] @@ -11238,7 +11436,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -11354,6 +11552,53 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +[[package]] +name = "typify" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c1dac028e66a2f46bca342cc50d8b4a8cae7faa22bb1827d0edff2ba541137e" +dependencies = [ + "typify-impl", + "typify-macro", +] + +[[package]] +name = "typify-impl" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2581b9356461e1c4de1fa56b8cf3867521c0f77e42a2d1d94bb18b4b73a318ef" +dependencies = [ + "heck 0.5.0", + "log", + "proc-macro2", + "quote", + "regress", + "schemars", + "semver", + "serde", + "serde_json", + "syn 2.0.114", + "thiserror 2.0.18", + "unicode-ident", +] + +[[package]] +name = "typify-macro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e11d93420ad3953f85e71a8662726a5fc20f2745d1c971a0102806f144157e" +dependencies = [ + "proc-macro2", + "quote", + "schemars", + "semver", + "serde", + "serde_json", + "serde_tokenstream", + "syn 2.0.114", + "typify-impl", +] + [[package]] name = "unarray" version = "0.1.4" @@ -11481,12 +11726,6 @@ name = "uuid" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" -dependencies = [ - "getrandom 0.3.4", - "js-sys", - "serde_core", - "wasm-bindgen", -] [[package]] name = "valuable" @@ -11598,9 +11837,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -11611,11 +11850,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.56" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -11624,9 +11864,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -11634,31 +11874,44 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -11759,7 +12012,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -11770,7 +12023,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -12124,6 +12377,29 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wiremock" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08db1edfb05d9b3c1542e521aea074442088292f00b5f28e435c714a98f85031" +dependencies = [ + "assert-json-diff", + "base64 0.22.1", + "deadpool", + "futures", + "http 1.4.0", + "http-body-util", + "hyper 1.8.1", + "hyper-util", + "log", + "once_cell", + "regex", + "serde", + "serde_json", + "tokio", + "url", +] + [[package]] name = "wit-bindgen" version = "0.46.0" @@ -12222,7 +12498,7 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "synstructure 0.13.2", ] @@ -12255,7 +12531,7 @@ checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -12275,7 +12551,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "synstructure 0.13.2", ] @@ -12296,7 +12572,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -12329,9 +12605,15 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] +[[package]] +name = "zmij" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445" + [[package]] name = "zstd" version = "0.13.3" diff --git a/Cargo.toml b/Cargo.toml index 3dd5881ce7..3408df31af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +exclude = ["external/photon"] members = [ "program-libs/account-checks", diff --git a/cli/src/commands/test-validator/index.ts b/cli/src/commands/test-validator/index.ts index 9a33d58c86..b694ede7d6 100644 --- a/cli/src/commands/test-validator/index.ts +++ b/cli/src/commands/test-validator/index.ts @@ -53,9 +53,9 @@ class SetupCommand extends Command { required: false, default: 8080, }), - "compressible-pda-program": Flags.string({ + "light-pda-program": Flags.string({ description: - "Compressible PDA programs to track. Format: 'program_id:discriminator_base58'. Can be specified multiple times.", + "Light PDA programs to track. Format: 'program_id:discriminator_base58'. Can be specified multiple times.", required: false, multiple: true, }), @@ -294,7 +294,7 @@ class SetupCommand extends Command { prover: !flags["skip-prover"], forester: flags.forester, foresterPort: flags["forester-port"], - compressiblePdaPrograms: flags["compressible-pda-program"], + lightPdaPrograms: flags["light-pda-program"], skipSystemAccounts: flags["skip-system-accounts"], geyserConfig: flags["geyser-config"], validatorArgs: flags["validator-args"], diff --git a/cli/src/utils/constants.ts b/cli/src/utils/constants.ts index 7ff7e03730..f53b152bf4 100644 --- a/cli/src/utils/constants.ts +++ b/cli/src/utils/constants.ts @@ -29,7 +29,7 @@ export const PHOTON_VERSION = "0.51.2"; // Set these to override Photon requirements with a specific git commit: export const USE_PHOTON_FROM_GIT = true; // If true, will show git install command instead of crates.io. export const PHOTON_GIT_REPO = "https://github.com/lightprotocol/photon.git"; -export const PHOTON_GIT_COMMIT = "ac7df6c388db847b7693a7a1cb766a7c9d7809b5"; // If empty, will use main branch. +export const PHOTON_GIT_COMMIT = "32e9ae60926a0d614ad444b799d15c15c02f2ef7"; // If empty, will use main branch. export const LIGHT_PROTOCOL_PROGRAMS_DIR_ENV = "LIGHT_PROTOCOL_PROGRAMS_DIR"; export const BASE_PATH = "../../bin/"; diff --git a/cli/src/utils/initTestEnv.ts b/cli/src/utils/initTestEnv.ts index 7dc57d2a92..c181539023 100644 --- a/cli/src/utils/initTestEnv.ts +++ b/cli/src/utils/initTestEnv.ts @@ -157,7 +157,7 @@ export async function initTestEnv({ verbose, skipReset, useSurfpool, - compressiblePdaPrograms, + lightPdaPrograms, additionalAccountDirs, }: { additionalPrograms?: { address: string; path: string }[]; @@ -184,7 +184,7 @@ export async function initTestEnv({ verbose?: boolean; skipReset?: boolean; useSurfpool?: boolean; - compressiblePdaPrograms?: string[]; + lightPdaPrograms?: string[]; additionalAccountDirs?: string[]; }) { if (useSurfpool) { @@ -281,7 +281,7 @@ export async function initTestEnv({ proverUrl: `http://127.0.0.1:${proverPort}`, payer, foresterPort, - compressiblePdaPrograms, + lightPdaPrograms, }); } catch (error) { console.error("Failed to start forester:", error); @@ -302,7 +302,7 @@ export async function initTestEnv({ proverUrl: `http://127.0.0.1:${proverPort}`, payer, foresterPort, - compressiblePdaPrograms, + lightPdaPrograms, }); } catch (error) { console.error("Failed to start forester:", error); diff --git a/cli/src/utils/processForester.ts b/cli/src/utils/processForester.ts index 9bbc255e72..780c7b997a 100644 --- a/cli/src/utils/processForester.ts +++ b/cli/src/utils/processForester.ts @@ -29,7 +29,7 @@ export interface ForesterConfig { proverUrl: string; payer: string; foresterPort: number; - compressiblePdaPrograms?: string[]; + lightPdaPrograms?: string[]; } /** @@ -64,10 +64,10 @@ export async function startForester(config: ForesterConfig) { "--enable-compressible", ]; - // Add compressible PDA programs if specified - if (config.compressiblePdaPrograms && config.compressiblePdaPrograms.length > 0) { - for (const program of config.compressiblePdaPrograms) { - args.push("--compressible-pda-program", program); + // Add light PDA programs if specified + if (config.lightPdaPrograms && config.lightPdaPrograms.length > 0) { + for (const program of config.lightPdaPrograms) { + args.push("--light-pda-program", program); } } diff --git a/external/photon b/external/photon new file mode 160000 index 0000000000..301153a04c --- /dev/null +++ b/external/photon @@ -0,0 +1 @@ +Subproject commit 301153a04c3232413198098a0a6725207ce36298 diff --git a/forester-utils/CHANGELOG.md b/forester-utils/CHANGELOG.md new file mode 100644 index 0000000000..d3ca38ac17 --- /dev/null +++ b/forester-utils/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +## [Unreleased] + +### Breaking Changes + +- **Removed `api_key` field and `.api_key()` builder method from `SolanaRpcPoolBuilder`.** + +- **Removed `api_key` parameter from `SolanaConnectionManager::new`.** diff --git a/forester-utils/src/rpc_pool.rs b/forester-utils/src/rpc_pool.rs index 1c6d5d8c20..145f4942ca 100644 --- a/forester-utils/src/rpc_pool.rs +++ b/forester-utils/src/rpc_pool.rs @@ -27,7 +27,6 @@ pub enum PoolError { pub struct SolanaConnectionManager { url: String, photon_url: Option, - api_key: Option, commitment: CommitmentConfig, // TODO: implement Rpc for SolanaConnectionManager and rate limit requests. _rpc_rate_limiter: Option, @@ -39,7 +38,6 @@ impl SolanaConnectionManager { pub fn new( url: String, photon_url: Option, - api_key: Option, commitment: CommitmentConfig, rpc_rate_limiter: Option, send_tx_rate_limiter: Option, @@ -47,7 +45,6 @@ impl SolanaConnectionManager { Self { url, photon_url, - api_key, commitment, _rpc_rate_limiter: rpc_rate_limiter, _send_tx_rate_limiter: send_tx_rate_limiter, @@ -67,7 +64,6 @@ impl bb8::ManageConnection for SolanaConnectionManager { photon_url: self.photon_url.clone(), commitment_config: Some(self.commitment), fetch_active_tree: false, - api_key: self.api_key.clone(), }; Ok(R::new(config).await?) @@ -94,7 +90,6 @@ pub struct SolanaRpcPool { pub struct SolanaRpcPoolBuilder { url: Option, photon_url: Option, - api_key: Option, commitment: Option, max_size: u32, @@ -120,7 +115,6 @@ impl SolanaRpcPoolBuilder { Self { url: None, photon_url: None, - api_key: None, commitment: None, max_size: 50, connection_timeout_secs: 15, @@ -144,11 +138,6 @@ impl SolanaRpcPoolBuilder { self } - pub fn api_key(mut self, api_key: Option) -> Self { - self.api_key = api_key; - self - } - pub fn commitment(mut self, commitment: CommitmentConfig) -> Self { self.commitment = Some(commitment); self @@ -205,7 +194,6 @@ impl SolanaRpcPoolBuilder { let manager = SolanaConnectionManager::new( url, self.photon_url, - self.api_key, commitment, self.rpc_rate_limiter, self.send_tx_rate_limiter, diff --git a/forester/.env.example b/forester/.env.example index cf77ec3ee8..81c1197919 100644 --- a/forester/.env.example +++ b/forester/.env.example @@ -2,9 +2,8 @@ export RPC_URL="https://api.devnet.solana.com" export WS_RPC_URL="wss://api.devnet.solana.com" -# Photon export INDEXER_URL="http://localhost:8784" -export PHOTON_API_KEY="00000000-0000-0000-0000-000000000000" +# export INDEXER_URL="https://photon.helius.com?api-key=YOUR_KEY" # Prover Configuration export PROVER_URL="http://localhost:3001" diff --git a/forester/CHANGELOG.md b/forester/CHANGELOG.md new file mode 100644 index 0000000000..388f633a93 --- /dev/null +++ b/forester/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changelog + +## [Unreleased] + +### Breaking Changes + +- **Removed `--photon-api-key` CLI arg and `PHOTON_API_KEY` env var.** The API key should now be included in `--indexer-url` as a query parameter: + ```bash + # Before + --indexer-url https://photon.helius.com --photon-api-key YOUR_KEY + + # After + --indexer-url "https://photon.helius.com?api-key=YOUR_KEY" + ``` + +- **Removed `photon_api_key` field from `ExternalServicesConfig`.** The `indexer_url` field now carries the full URL including the API key. + +- **Removed `ExternalServicesConfig::photon_url()` helper.** Use `indexer_url` directly instead. diff --git a/forester/README.md b/forester/README.md index 8ad0332d8f..9fdf82d14e 100644 --- a/forester/README.md +++ b/forester/README.md @@ -157,8 +157,6 @@ Control which test scenarios to run (all default to `true`): - `PHOTON_WSS_RPC_URL` - Photon WebSocket RPC endpoint URL - `PHOTON_INDEXER_URL` - Photon indexer endpoint URL - `PHOTON_PROVER_URL` - Photon prover endpoint URL -- `PHOTON_API_KEY` - Photon API key for authentication - #### Required for both modes: - `FORESTER_KEYPAIR` - Keypair for testing (supports both base58 format and byte array format like `[1,2,3,...]`) @@ -192,9 +190,8 @@ export TEST_V1_ADDRESS="false" export TEST_V2_ADDRESS="true" export PHOTON_RPC_URL="https://devnet.helius-rpc.com/?api-key=your-key" export PHOTON_WSS_RPC_URL="wss://devnet.helius-rpc.com/?api-key=your-key" -export PHOTON_INDEXER_URL="https://devnet.helius-rpc.com" +export PHOTON_INDEXER_URL="https://devnet.helius-rpc.com?api-key=your-key" export PHOTON_PROVER_URL="https://devnet.helius-rpc.com" -export PHOTON_API_KEY="your-api-key" export FORESTER_KEYPAIR="your-base58-encoded-keypair" ``` diff --git a/forester/src/cli.rs b/forester/src/cli.rs index 21c28e6787..acf0c9ae8c 100644 --- a/forester/src/cli.rs +++ b/forester/src/cli.rs @@ -29,7 +29,11 @@ pub struct StartArgs { #[arg(long, env = "WS_RPC_URL")] pub ws_rpc_url: Option, - #[arg(long, env = "INDEXER_URL")] + #[arg( + long, + env = "INDEXER_URL", + help = "Photon indexer URL. API key can be included as query param: https://host?api-key=KEY" + )] pub indexer_url: Option, #[arg(long, env = "PROVER_URL")] @@ -79,9 +83,6 @@ pub struct StartArgs { #[arg(long, env = "DERIVATION_PUBKEY")] pub derivation: Option, - #[arg(long, env = "PHOTON_API_KEY")] - pub photon_api_key: Option, - #[arg(long, env = "PHOTON_GRPC_URL")] pub photon_grpc_url: Option, @@ -237,12 +238,12 @@ pub struct StartArgs { pub enable_compressible: bool, #[arg( - long = "compressible-pda-program", - env = "COMPRESSIBLE_PDA_PROGRAMS", - help = "Compressible PDA programs to track. Format: 'program_id:discriminator_base58'. Can be specified multiple times. Example: 'MyProg1111111111111111111111111111111111111:6kRvHBv2N3F'", + long = "light-pda-program", + env = "LIGHT_PDA_PROGRAMS", + help = "Light PDA programs to track. Format: 'program_id:discriminator_base58'. Can be specified multiple times. Example: 'MyProg1111111111111111111111111111111111111:6kRvHBv2N3F'", value_delimiter = ',' )] - pub compressible_pda_programs: Vec, + pub light_pda_programs: Vec, #[arg( long, diff --git a/forester/src/compressible/config.rs b/forester/src/compressible/config.rs index 14668317a2..011535d198 100644 --- a/forester/src/compressible/config.rs +++ b/forester/src/compressible/config.rs @@ -34,7 +34,7 @@ pub const DEFAULT_PAGINATION_DELAY_MS: u64 = 100; /// Configuration for a compressible PDA program. /// -/// Can be specified via CLI `--compressible-pda-program` (using `program_id:discriminator_base58` format) +/// Can be specified via CLI `--light-pda-program` (using `program_id:discriminator_base58` format) /// or via config file using the serialized struct format. #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PdaProgramConfig { @@ -146,7 +146,7 @@ pub struct CompressibleConfig { #[serde(default = "default_max_concurrent_batches")] pub max_concurrent_batches: usize, /// Compressible PDA programs to track and compress. - /// Can be specified in config file or via CLI `--compressible-pda-program` flags. + /// Can be specified in config file or via CLI `--light-pda-program` flags. /// CLI values are merged with config file values. #[serde(default)] pub pda_programs: Vec, diff --git a/forester/src/config.rs b/forester/src/config.rs index 460343c903..0dc22b9227 100644 --- a/forester/src/config.rs +++ b/forester/src/config.rs @@ -44,7 +44,6 @@ pub struct ExternalServicesConfig { pub prover_api_key: Option, pub prover_polling_interval: Option, pub prover_max_wait_time: Option, - pub photon_api_key: Option, pub photon_grpc_url: Option, pub pushgateway_url: Option, pub pagerduty_routing_key: Option, @@ -268,7 +267,6 @@ impl ForesterConfig { prover_api_key: args.prover_api_key.clone(), prover_polling_interval: args.prover_polling_interval_ms.map(Duration::from_millis), prover_max_wait_time: args.prover_max_wait_time_secs.map(Duration::from_secs), - photon_api_key: args.photon_api_key.clone(), photon_grpc_url: args.photon_grpc_url.clone(), pushgateway_url: args.push_gateway_url.clone(), pagerduty_routing_key: args.pagerduty_routing_key.clone(), @@ -362,19 +360,18 @@ impl ForesterConfig { derivation_pubkey: derivation, address_tree_data: vec![], state_tree_data: vec![], - compressible_config: if args.enable_compressible - || !args.compressible_pda_programs.is_empty() + compressible_config: if args.enable_compressible || !args.light_pda_programs.is_empty() { match &args.ws_rpc_url { Some(ws_url) => { // Parse PDA program configurations let pda_programs: Vec = args - .compressible_pda_programs + .light_pda_programs .iter() .map(|s| { s.parse::() .map_err(|e| ConfigError::InvalidArguments { - field: "compressible_pda_programs", + field: "light_pda_programs", invalid_values: vec![e], }) }) @@ -389,7 +386,7 @@ impl ForesterConfig { return Err(ConfigError::InvalidArguments { field: "ws_rpc_url", invalid_values: vec![ - "--ws-rpc-url is required when --enable-compressible is true or --compressible-pda-program is specified" + "--ws-rpc-url is required when --enable-compressible is true or --light-pda-program is specified" .to_string(), ], } @@ -427,7 +424,6 @@ impl ForesterConfig { prover_api_key: None, prover_polling_interval: None, prover_max_wait_time: None, - photon_api_key: None, photon_grpc_url: None, pushgateway_url: args.push_gateway_url.clone(), pagerduty_routing_key: args.pagerduty_routing_key.clone(), diff --git a/forester/src/epoch_manager.rs b/forester/src/epoch_manager.rs index a365885e73..687125b5a6 100644 --- a/forester/src/epoch_manager.rs +++ b/forester/src/epoch_manager.rs @@ -898,7 +898,6 @@ impl EpochManager { let rpc = LightClient::new(LightClientConfig { url: self.config.external_services.rpc_url.to_string(), photon_url: self.config.external_services.indexer_url.clone(), - api_key: self.config.external_services.photon_api_key.clone(), commitment_config: Some(solana_sdk::commitment_config::CommitmentConfig::confirmed()), fetch_active_tree: false, }) @@ -976,7 +975,6 @@ impl EpochManager { let mut rpc = LightClient::new(LightClientConfig { url: self.config.external_services.rpc_url.to_string(), photon_url: self.config.external_services.indexer_url.clone(), - api_key: self.config.external_services.photon_api_key.clone(), commitment_config: Some(solana_sdk::commitment_config::CommitmentConfig::processed()), fetch_active_tree: false, }) @@ -2896,7 +2894,6 @@ impl EpochManager { let mut rpc = LightClient::new(LightClientConfig { url: self.config.external_services.rpc_url.to_string(), photon_url: self.config.external_services.indexer_url.clone(), - api_key: self.config.external_services.photon_api_key.clone(), commitment_config: Some(solana_sdk::commitment_config::CommitmentConfig::processed()), fetch_active_tree: false, }) @@ -3366,7 +3363,6 @@ mod tests { prover_update_url: None, prover_address_append_url: None, prover_api_key: None, - photon_api_key: None, photon_grpc_url: None, pushgateway_url: None, pagerduty_routing_key: None, diff --git a/forester/src/errors.rs b/forester/src/errors.rs index 2653ffe62b..250c1f684c 100644 --- a/forester/src/errors.rs +++ b/forester/src/errors.rs @@ -4,7 +4,6 @@ use forester_utils::rpc_pool::PoolError; use light_client::rpc::errors::RpcError; use light_compressed_account::TreeType; use light_registry::errors::RegistryError; -use photon_api::apis::{default_api::GetCompressedAccountProofPostError, Error as PhotonApiError}; use solana_program::{program_error::ProgramError, pubkey::Pubkey}; use thiserror::Error; use tracing::{info, warn}; @@ -197,11 +196,6 @@ impl WorkReportError { } } -#[derive(Error, Debug)] -pub enum PhotonApiErrorWrapper { - #[error(transparent)] - GetCompressedAccountProofPostError(#[from] PhotonApiError), -} impl ForesterError { pub fn indexer(error: E) -> Self { Self::Indexer(IndexerError::General { diff --git a/forester/src/forester_status.rs b/forester/src/forester_status.rs index 5149307391..ab5ff8014b 100644 --- a/forester/src/forester_status.rs +++ b/forester/src/forester_status.rs @@ -108,7 +108,6 @@ pub async fn get_forester_status_with_options( let rpc = LightClient::new(LightClientConfig { url: rpc_url.to_string(), photon_url: None, - api_key: None, commitment_config: None, fetch_active_tree: false, }) @@ -810,7 +809,6 @@ pub async fn fetch_forester_status(args: &StatusArgs) -> crate::Result<()> { let mut rpc = LightClient::new(LightClientConfig { url: config.external_services.rpc_url.to_string(), photon_url: config.external_services.indexer_url.clone(), - api_key: config.external_services.photon_api_key.clone(), commitment_config: None, fetch_active_tree: false, }) diff --git a/forester/src/lib.rs b/forester/src/lib.rs index 2167db96c2..203015ddbd 100644 --- a/forester/src/lib.rs +++ b/forester/src/lib.rs @@ -57,7 +57,6 @@ pub async fn run_queue_info( let mut rpc = LightClient::new(LightClientConfig { url: config.external_services.rpc_url.to_string(), photon_url: config.external_services.indexer_url.clone(), - api_key: config.external_services.photon_api_key.clone(), commitment_config: None, fetch_active_tree: false, }) @@ -153,7 +152,6 @@ pub async fn run_pipeline( let mut builder = SolanaRpcPoolBuilder::::default() .url(config.external_services.rpc_url.to_string()) .photon_url(config.external_services.indexer_url.clone()) - .api_key(config.external_services.photon_api_key.clone()) .commitment(CommitmentConfig::processed()) .max_size(config.rpc_pool_config.max_size) .connection_timeout_secs(config.rpc_pool_config.connection_timeout_secs) diff --git a/forester/tests/e2e_test.rs b/forester/tests/e2e_test.rs index 98ca8763c4..24f418489e 100644 --- a/forester/tests/e2e_test.rs +++ b/forester/tests/e2e_test.rs @@ -118,13 +118,6 @@ fn get_prover_url() -> String { } } -fn get_photon_api_key() -> Option { - match TestMode::from_env() { - TestMode::Local => None, - TestMode::Devnet => Some(get_env_var("PHOTON_API_KEY")), - } -} - fn get_photon_grpc_url() -> Option { match TestMode::from_env() { TestMode::Local => Some("http://localhost:50051".to_string()), @@ -214,7 +207,6 @@ async fn e2e_test() { prover_api_key: get_prover_api_key(), prover_polling_interval: None, prover_max_wait_time: None, - photon_api_key: get_photon_api_key(), photon_grpc_url: get_photon_grpc_url(), pushgateway_url: None, pagerduty_routing_key: None, @@ -577,7 +569,7 @@ async fn setup_rpc_connection(forester: &Keypair) -> LightClient { let mut rpc = LightClient::new(if TestMode::from_env() == TestMode::Local { LightClientConfig::local() } else { - LightClientConfig::new(get_rpc_url(), Some(get_indexer_url()), get_photon_api_key()) + LightClientConfig::new(get_rpc_url(), Some(get_indexer_url())) }) .await .unwrap(); diff --git a/forester/tests/legacy/batched_address_test.rs b/forester/tests/legacy/batched_address_test.rs index aa71314226..3ce12087ff 100644 --- a/forester/tests/legacy/batched_address_test.rs +++ b/forester/tests/legacy/batched_address_test.rs @@ -116,7 +116,7 @@ async fn test_address_batched() { let indexer = TestIndexer::init_from_acounts(&config.payer_keypair, &test_accounts, 0).await; - let mut photon_indexer = PhotonIndexer::new(PhotonIndexer::default_path(), None); + let mut photon_indexer = PhotonIndexer::new(PhotonIndexer::default_path()); let mut env = E2ETestEnv::::new( rpc, diff --git a/forester/tests/legacy/batched_state_async_indexer_test.rs b/forester/tests/legacy/batched_state_async_indexer_test.rs index ac719ea9aa..fe599a39a8 100644 --- a/forester/tests/legacy/batched_state_async_indexer_test.rs +++ b/forester/tests/legacy/batched_state_async_indexer_test.rs @@ -233,7 +233,7 @@ async fn ensure_sufficient_balance(rpc: &mut LightClient, pubkey: &Pubkey, targe } fn create_photon_indexer() -> PhotonIndexer { - PhotonIndexer::new(PHOTON_INDEXER_URL.to_string(), None) + PhotonIndexer::new(PHOTON_INDEXER_URL.to_string()) } async fn get_protocol_config(rpc: &mut LightClient) -> ProtocolConfig { diff --git a/forester/tests/legacy/batched_state_indexer_test.rs b/forester/tests/legacy/batched_state_indexer_test.rs index 1bea68ba1e..d3255abd61 100644 --- a/forester/tests/legacy/batched_state_indexer_test.rs +++ b/forester/tests/legacy/batched_state_indexer_test.rs @@ -104,7 +104,7 @@ async fn test_state_indexer_batched() { config.derivation_pubkey = forester_keypair.pubkey(); config.payer_keypair = new_forester_keypair.insecure_clone(); - let photon_indexer = PhotonIndexer::new("http://127.0.0.1:8784".to_string(), None); + let photon_indexer = PhotonIndexer::new("http://127.0.0.1:8784".to_string()); let mut e2e_env: E2ETestEnv; e2e_env = init_program_test_env(rpc, &env, tree_params.output_queue_batch_size as usize).await; diff --git a/forester/tests/legacy/e2e_v1_test.rs b/forester/tests/legacy/e2e_v1_test.rs index 88b88af86c..37578846d4 100644 --- a/forester/tests/legacy/e2e_v1_test.rs +++ b/forester/tests/legacy/e2e_v1_test.rs @@ -409,7 +409,6 @@ async fn test_epoch_double_registration() { let mut rpc = LightClient::new(LightClientConfig { url: RpcUrl::Localnet.to_string(), photon_url: None, - api_key: None, commitment_config: Some(CommitmentConfig::confirmed()), fetch_active_tree: false, }) diff --git a/forester/tests/legacy/priority_fee_test.rs b/forester/tests/legacy/priority_fee_test.rs index cf79a4e84b..f7c805db30 100644 --- a/forester/tests/legacy/priority_fee_test.rs +++ b/forester/tests/legacy/priority_fee_test.rs @@ -45,9 +45,6 @@ async fn test_priority_fee_request() { std::env::var("FORESTER_DERIVATION_PUBKEY") .expect("FORESTER_DERIVATION_PUBKEY must be set in environment"), ), - photon_api_key: Some( - std::env::var("PHOTON_API_KEY").expect("PHOTON_API_KEY must be set in environment"), - ), indexer_batch_size: 50, indexer_max_concurrent_batches: 10, legacy_ixs_per_tx: 1, diff --git a/forester/tests/legacy/test_utils.rs b/forester/tests/legacy/test_utils.rs index fb1c42a3ef..47425cabbc 100644 --- a/forester/tests/legacy/test_utils.rs +++ b/forester/tests/legacy/test_utils.rs @@ -81,7 +81,6 @@ pub fn forester_config() -> ForesterConfig { prover_api_key: None, prover_polling_interval: None, prover_max_wait_time: None, - photon_api_key: None, photon_grpc_url: None, pushgateway_url: None, pagerduty_routing_key: None, diff --git a/forester/tests/priority_fee_test.rs b/forester/tests/priority_fee_test.rs index b709f34c97..c816a40ccc 100644 --- a/forester/tests/priority_fee_test.rs +++ b/forester/tests/priority_fee_test.rs @@ -44,9 +44,6 @@ async fn test_priority_fee_request() { std::env::var("DERIVATION_PUBKEY") .expect("DERIVATION_PUBKEY must be set in environment"), ), - photon_api_key: Some( - std::env::var("PHOTON_API_KEY").expect("PHOTON_API_KEY must be set in environment"), - ), api_server_public_bind: false, photon_grpc_url: None, indexer_batch_size: 50, @@ -86,7 +83,7 @@ async fn test_priority_fee_request() { lookup_table_address: None, api_server_port: 8080, group_authority: None, - compressible_pda_programs: vec![], + light_pda_programs: vec![], }; let config = ForesterConfig::new_for_start(&args).expect("Failed to create config"); diff --git a/forester/tests/test_batch_append_spent.rs b/forester/tests/test_batch_append_spent.rs index 547acf0193..e53c2b64eb 100644 --- a/forester/tests/test_batch_append_spent.rs +++ b/forester/tests/test_batch_append_spent.rs @@ -68,7 +68,6 @@ async fn test_batch_sequence() { let mut rpc = LightClient::new(LightClientConfig { url: RpcUrl::Localnet.to_string(), photon_url: Some("http://localhost:8784".to_string()), - api_key: None, commitment_config: Some(commitment_config), fetch_active_tree: false, }) diff --git a/forester/tests/test_indexer_interface.rs b/forester/tests/test_indexer_interface.rs index 6918ae1fd1..755c8fe174 100644 --- a/forester/tests/test_indexer_interface.rs +++ b/forester/tests/test_indexer_interface.rs @@ -454,7 +454,7 @@ async fn test_indexer_interface_scenarios() { println!("\n========== TESTING INTERFACE ENDPOINTS ==========\n"); // Create PhotonIndexer to test the interface endpoints - let photon_indexer = PhotonIndexer::new("http://localhost:8784".to_string(), None); + let photon_indexer = PhotonIndexer::new("http://localhost:8784".to_string()); // ============ Test 1: getAccountInterface with compressible token account (on-chain) ============ println!("Test 1: getAccountInterface with compressible token account (on-chain)..."); diff --git a/forester/tests/test_utils.rs b/forester/tests/test_utils.rs index c77d417a64..d9aaa2f0c2 100644 --- a/forester/tests/test_utils.rs +++ b/forester/tests/test_utils.rs @@ -91,7 +91,6 @@ pub fn forester_config() -> ForesterConfig { prover_api_key: None, prover_polling_interval: None, prover_max_wait_time: None, - photon_api_key: None, photon_grpc_url: None, pushgateway_url: None, pagerduty_routing_key: None, diff --git a/program-tests/utils/src/setup_accounts.rs b/program-tests/utils/src/setup_accounts.rs index f63244fe7b..c52fd86002 100644 --- a/program-tests/utils/src/setup_accounts.rs +++ b/program-tests/utils/src/setup_accounts.rs @@ -14,7 +14,6 @@ pub async fn setup_accounts(keypairs: TestKeypairs, url: RpcUrl) -> Result Result<(), Box> { // Connect to the validator let mut rpc = LightClient::new(LightClientConfig::local()).await?; - // Or connect to devnet/mainnet: - // let mut rpc = LightClient::new(LightClientConfig::new("https://devnet.helius-rpc.com/?api-key=YOUR_KEY")).await?; - // let mut rpc = LightClient::new(LightClientConfig::new("https://mainnet.helius-rpc.com/?api-key=YOUR_KEY")).await?; + // Or connect to devnet/mainnet (API key embedded in photon URL): + // let mut rpc = LightClient::new(LightClientConfig::new( + // "https://devnet.helius-rpc.com".to_string(), + // Some("https://photon.helius.com?api-key=YOUR_KEY".to_string()), + // )).await?; let owner = Pubkey::new_unique(); diff --git a/sdk-libs/client/src/indexer/base58.rs b/sdk-libs/client/src/indexer/base58.rs index 46b3953aa3..c99a5b37fe 100644 --- a/sdk-libs/client/src/indexer/base58.rs +++ b/sdk-libs/client/src/indexer/base58.rs @@ -50,11 +50,19 @@ pub fn decode_base58_to_fixed_array(input: &str) -> Result<[u8; Ok(buffer) } -pub fn decode_base58_option_to_pubkey( - value: &Option, +/// Decode an Option newtype wrapper to Option +pub fn decode_serializable_pubkey_option( + value: &Option, ) -> Result, IndexerError> { value .as_ref() - .map(|ctx| decode_base58_to_fixed_array(ctx).map(Pubkey::new_from_array)) + .map(|ctx| decode_base58_to_fixed_array(&ctx.0).map(Pubkey::new_from_array)) .transpose() } + +/// Alias for backward compatibility +pub fn decode_base58_option_to_pubkey( + value: &Option, +) -> Result, IndexerError> { + decode_serializable_pubkey_option(value) +} diff --git a/sdk-libs/client/src/indexer/error.rs b/sdk-libs/client/src/indexer/error.rs index b40a0e11a1..d83b057989 100644 --- a/sdk-libs/client/src/indexer/error.rs +++ b/sdk-libs/client/src/indexer/error.rs @@ -90,16 +90,7 @@ impl IndexerError { impl From> for IndexerError { fn from(error: photon_api::apis::Error) -> Self { - match error { - photon_api::apis::Error::Reqwest(e) => { - IndexerError::ApiError(format!("Request error: {}", e)) - } - photon_api::apis::Error::Serde(e) => { - IndexerError::ApiError(format!("Serialization error: {}", e)) - } - photon_api::apis::Error::Io(e) => IndexerError::ApiError(format!("IO error: {}", e)), - _ => IndexerError::ApiError(format!("Unknown API error {}", error)), - } + IndexerError::ApiError(error.to_string()) } } diff --git a/sdk-libs/client/src/indexer/options.rs b/sdk-libs/client/src/indexer/options.rs index 87fc8f4e8a..76a05d8a94 100644 --- a/sdk-libs/client/src/indexer/options.rs +++ b/sdk-libs/client/src/indexer/options.rs @@ -1,4 +1,4 @@ -use photon_api::models::{FilterSelector, Memcmp}; +use photon_api::types::{FilterSelector, Memcmp}; use solana_account_decoder_client_types::UiDataSliceConfig; use solana_pubkey::Pubkey; @@ -44,10 +44,10 @@ pub struct GetCompressedAccountsFilter { impl Into for GetCompressedAccountsFilter { fn into(self) -> FilterSelector { FilterSelector { - memcmp: Some(Box::new(Memcmp { - offset: self.offset, - bytes: base64::encode(&self.bytes), // TODO: double check - })), + memcmp: Some(Memcmp { + offset: self.offset as u64, + bytes: photon_api::types::Base58String(bs58::encode(&self.bytes).into_string()), + }), } } } diff --git a/sdk-libs/client/src/indexer/photon_indexer.rs b/sdk-libs/client/src/indexer/photon_indexer.rs index c0ba68a686..ef6e78fb2d 100644 --- a/sdk-libs/client/src/indexer/photon_indexer.rs +++ b/sdk-libs/client/src/indexer/photon_indexer.rs @@ -3,10 +3,7 @@ use std::{fmt::Debug, time::Duration}; use async_trait::async_trait; use bs58; use light_sdk_types::constants::STATE_MERKLE_TREE_CANOPY_DEPTH; -use photon_api::{ - apis::configuration::{ApiKey, Configuration}, - models::GetCompressedAccountsByOwnerPostRequestParams, -}; +use photon_api::apis::configuration::Configuration; use solana_pubkey::Pubkey; use tracing::{error, trace, warn}; @@ -110,16 +107,8 @@ impl PhotonIndexer { } impl PhotonIndexer { - pub fn new(path: String, api_key: Option) -> Self { - let configuration = Configuration { - base_path: path, - api_key: api_key.map(|key| ApiKey { - prefix: Some("api-key".to_string()), - key, - }), - ..Default::default() - }; - + pub fn new(url: String) -> Self { + let configuration = Configuration::new(url); PhotonIndexer { configuration } } @@ -131,22 +120,25 @@ impl PhotonIndexer { result.ok_or_else(|| IndexerError::missing_result(context, "value not present")) } - fn extract_result_with_error_check( + fn check_api_error( context: &str, - error: Option>, - result: Option, - ) -> Result { + error: Option, + ) -> Result<(), IndexerError> { if let Some(error) = error { - let error_message = error - .clone() - .message - .unwrap_or_else(|| format!("Unknown API error: {:?}", error).to_string()); return Err(IndexerError::ApiError(format!( - "API error in {} (code: {:?}): {}", - context, error.code, error_message + "API error in {}: {:?}", + context, error ))); } + Ok(()) + } + fn extract_result_with_error_check( + context: &str, + error: Option, + result: Option, + ) -> Result { + Self::check_api_error(context, error)?; Self::extract_result(context, result) } @@ -154,7 +146,7 @@ impl PhotonIndexer { &self, address: Option
, hash: Option, - ) -> Result { + ) -> Result { match (address, hash) { (None, None) => Err(IndexerError::InvalidParameters( "Either address or hash must be provided".to_string(), @@ -162,9 +154,9 @@ impl PhotonIndexer { (Some(_), Some(_)) => Err(IndexerError::InvalidParameters( "Only one of address or hash must be provided".to_string(), )), - (address, hash) => Ok(photon_api::models::GetCompressedAccountPostRequestParams { - address: address.map(|x| x.to_base58()), - hash: hash.map(|x| x.to_base58()), + (address, hash) => Ok(photon_api::types::PostGetCompressedAccountBodyParams { + address: address.map(|x| photon_api::types::SerializablePubkey(x.to_base58())), + hash: hash.map(|x| photon_api::types::Hash(x.to_base58())), }), } } @@ -188,26 +180,28 @@ impl Indexer for PhotonIndexer { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { let params = self.build_account_params(Some(address), None)?; - let request = photon_api::models::GetCompressedAccountPostRequest { - params: Box::new(params), - ..Default::default() - }; + let request = photon_api::apis::default_api::make_get_compressed_account_body(params); let result = photon_api::apis::default_api::get_compressed_account_post( &self.configuration, request, ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compressed_account", - result.error, - result.result.map(|r| *r), - )?; + + let api_response = result.result.ok_or_else(|| { + IndexerError::ApiError( + result + .error + .map(|e| format!("{:?}", e)) + .unwrap_or_else(|| "Unknown error".to_string()), + ) + })?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } let account = match api_response.value { - Some(boxed) => Some(CompressedAccount::try_from(&*boxed)?), + Some(ref acc) => Some(CompressedAccount::try_from(acc)?), None => None, }; @@ -229,26 +223,23 @@ impl Indexer for PhotonIndexer { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { let params = self.build_account_params(None, Some(hash))?; - let request = photon_api::models::GetCompressedAccountPostRequest { - params: Box::new(params), - ..Default::default() - }; + let request = photon_api::apis::default_api::make_get_compressed_account_body(params); let result = photon_api::apis::default_api::get_compressed_account_post( &self.configuration, request, ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compressed_account_by_hash", - result.error, - result.result.map(|r| *r), - )?; + + Self::check_api_error("get_compressed_account_by_hash", result.error)?; + let api_response = + Self::extract_result("get_compressed_account_by_hash", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } let account = match api_response.value { - Some(boxed) => Some(CompressedAccount::try_from(&*boxed)?), + Some(ref acc) => Some(CompressedAccount::try_from(acc)?), None => None, }; @@ -272,30 +263,31 @@ impl Indexer for PhotonIndexer { self.retry(config.retry_config, || async { #[cfg(feature = "v2")] { - let request = photon_api::models::GetCompressedAccountsByOwnerV2PostRequest { - params: Box::from(GetCompressedAccountsByOwnerPostRequestParams { - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - data_slice: options.as_ref().and_then(|o| { - o.data_slice.as_ref().map(|ds| { - Box::new(photon_api::models::DataSlice { - length: ds.length as u32, - offset: ds.offset as u32, - }) - }) - }), - filters: options.as_ref().and_then(|o| o.filters_to_photon()), - limit: options.as_ref().and_then(|o| o.limit), - owner: owner.to_string(), + let params = photon_api::types::PostGetCompressedAccountsByOwnerV2BodyParams { + cursor: options.as_ref().and_then(|o| o.cursor.clone()).map(photon_api::types::Hash), + data_slice: options.as_ref().and_then(|o| { + o.data_slice.as_ref().map(|ds| { + photon_api::types::DataSlice { + length: ds.length as u64, + offset: ds.offset as u64, + } + }) }), - ..Default::default() + filters: options.as_ref().and_then(|o| o.filters_to_photon()).unwrap_or_default(), + limit: options.as_ref().and_then(|o| o.limit).map(|l| photon_api::types::Limit(l as u64)), + owner: photon_api::types::SerializablePubkey(owner.to_string()), }; + let request = photon_api::apis::default_api::make_get_compressed_accounts_by_owner_v2_body(params); let result = photon_api::apis::default_api::get_compressed_accounts_by_owner_v2_post( &self.configuration, request, ) .await?; - let response = result.result.ok_or(IndexerError::AccountNotFound)?; + + Self::check_api_error("get_compressed_accounts_by_owner_v2", result.error)?; + let response = Self::extract_result("get_compressed_accounts_by_owner_v2", result.result)?; + if response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -306,7 +298,7 @@ impl Indexer for PhotonIndexer { .map(CompressedAccount::try_from) .collect(); - let cursor = response.value.cursor; + let cursor = response.value.cursor.map(|h| h.0); Ok(Response { context: Context { @@ -320,29 +312,35 @@ impl Indexer for PhotonIndexer { } #[cfg(not(feature = "v2"))] { - let request = photon_api::models::GetCompressedAccountsByOwnerPostRequest { - params: Box::from(GetCompressedAccountsByOwnerPostRequestParams { - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - data_slice: options.as_ref().and_then(|o| { - o.data_slice.as_ref().map(|ds| { - Box::new(photon_api::models::DataSlice { - length: ds.length as u32, - offset: ds.offset as u32, - }) - }) - }), - filters: options.as_ref().and_then(|o| o.filters_to_photon()), - limit: options.as_ref().and_then(|o| o.limit), - owner: owner.to_string(), + let params = photon_api::types::PostGetCompressedAccountsByOwnerBodyParams { + cursor: options.as_ref().and_then(|o| o.cursor.clone()).map(photon_api::types::Hash), + data_slice: options.as_ref().and_then(|o| { + o.data_slice.as_ref().map(|ds| { + photon_api::types::DataSlice { + length: ds.length as u64, + offset: ds.offset as u64, + } + }) }), - ..Default::default() + filters: options.as_ref().and_then(|o| o.filters_to_photon()).unwrap_or_default(), + limit: options.as_ref().and_then(|o| o.limit).map(|l| photon_api::types::Limit(l as u64)), + owner: photon_api::types::SerializablePubkey(owner.to_string()), + }; + let request = photon_api::types::PostGetCompressedAccountsByOwnerBody { + id: photon_api::types::PostGetCompressedAccountsByOwnerBodyId::TestAccount, + jsonrpc: photon_api::types::PostGetCompressedAccountsByOwnerBodyJsonrpc::X20, + method: photon_api::types::PostGetCompressedAccountsByOwnerBodyMethod::GetCompressedAccountsByOwner, + params, }; let result = photon_api::apis::default_api::get_compressed_accounts_by_owner_post( &self.configuration, request, ) .await?; - let response = result.result.ok_or(IndexerError::AccountNotFound)?; + + Self::check_api_error("get_compressed_accounts_by_owner", result.error)?; + let response = Self::extract_result("get_compressed_accounts_by_owner", result.result)?; + if response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -353,7 +351,7 @@ impl Indexer for PhotonIndexer { .map(CompressedAccount::try_from) .collect(); - let cursor = response.value.cursor; + let cursor = response.value.cursor.map(|h| h.0); Ok(Response { context: Context { @@ -377,11 +375,12 @@ impl Indexer for PhotonIndexer { ) -> Result, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let params = self.build_account_params(address, hash)?; - let request = photon_api::models::GetCompressedAccountBalancePostRequest { - params: Box::new(params), - ..Default::default() + let params = photon_api::types::PostGetCompressedAccountBalanceBodyParams { + address: address.map(|x| photon_api::types::SerializablePubkey(x.to_base58())), + hash: hash.map(|x| photon_api::types::Hash(x.to_base58())), }; + let request = + photon_api::apis::default_api::make_get_compressed_account_balance_body(params); let result = photon_api::apis::default_api::get_compressed_account_balance_post( &self.configuration, @@ -389,11 +388,10 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compressed_account_balance", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compressed_account_balance", result.error)?; + let api_response = + Self::extract_result("get_compressed_account_balance", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -401,7 +399,7 @@ impl Indexer for PhotonIndexer { context: Context { slot: api_response.context.slot, }, - value: api_response.value, + value: api_response.value.0, }) }) .await @@ -414,14 +412,11 @@ impl Indexer for PhotonIndexer { ) -> Result, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetCompressedBalanceByOwnerPostRequest { - params: Box::new( - photon_api::models::GetCompressedBalanceByOwnerPostRequestParams { - owner: owner.to_string(), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressedBalanceByOwnerBodyParams { + owner: photon_api::types::SerializablePubkey(owner.to_string()), }; + let request = + photon_api::apis::default_api::make_get_compressed_balance_by_owner_body(params); let result = photon_api::apis::default_api::get_compressed_balance_by_owner_post( &self.configuration, @@ -429,11 +424,10 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compressed_balance_by_owner", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compressed_balance_by_owner", result.error)?; + let api_response = + Self::extract_result("get_compressed_balance_by_owner", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -441,7 +435,7 @@ impl Indexer for PhotonIndexer { context: Context { slot: api_response.context.slot, }, - value: api_response.value, + value: api_response.value.0, }) }) .await @@ -455,16 +449,19 @@ impl Indexer for PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetCompressedMintTokenHoldersPostRequest { - params: Box::new( - photon_api::models::GetCompressedMintTokenHoldersPostRequestParams { - mint: mint.to_string(), - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressedMintTokenHoldersBodyParams { + mint: photon_api::types::SerializablePubkey(mint.to_string()), + cursor: options + .as_ref() + .and_then(|o| o.cursor.clone()) + .map(photon_api::types::Base58String), + limit: options + .as_ref() + .and_then(|o| o.limit) + .map(|l| photon_api::types::Limit(l as u64)), }; + let request = + photon_api::apis::default_api::make_get_compressed_mint_token_holders_body(params); let result = photon_api::apis::default_api::get_compressed_mint_token_holders_post( &self.configuration, @@ -472,11 +469,10 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compressed_mint_token_holders", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compressed_mint_token_holders", result.error)?; + let api_response = + Self::extract_result("get_compressed_mint_token_holders", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -487,7 +483,7 @@ impl Indexer for PhotonIndexer { .map(OwnerBalance::try_from) .collect(); - let cursor = api_response.value.cursor; + let cursor = api_response.value.cursor.map(|c| c.0); Ok(Response { context: Context { @@ -510,13 +506,14 @@ impl Indexer for PhotonIndexer { ) -> Result, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetCompressedTokenAccountBalancePostRequest { - params: Box::new(photon_api::models::GetCompressedAccountPostRequestParams { - address: address.map(|x| x.to_base58()), - hash: hash.map(|x| x.to_base58()), - }), - ..Default::default() + let params = photon_api::types::PostGetCompressedTokenAccountBalanceBodyParams { + address: address.map(|x| photon_api::types::SerializablePubkey(x.to_base58())), + hash: hash.map(|x| photon_api::types::Hash(x.to_base58())), }; + let request = + photon_api::apis::default_api::make_get_compressed_token_account_balance_body( + params, + ); let result = photon_api::apis::default_api::get_compressed_token_account_balance_post( &self.configuration, @@ -524,11 +521,10 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compressed_token_account_balance", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compressed_token_account_balance", result.error)?; + let api_response = + Self::extract_result("get_compressed_token_account_balance", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -536,7 +532,7 @@ impl Indexer for PhotonIndexer { context: Context { slot: api_response.context.slot, }, - value: api_response.value.amount, + value: api_response.value.amount.0, }) }) .await @@ -552,17 +548,13 @@ impl Indexer for PhotonIndexer { self.retry(config.retry_config, || async { #[cfg(feature = "v2")] { - let request = photon_api::models::GetCompressedTokenAccountsByDelegateV2PostRequest { - params: Box::new( - photon_api::models::GetCompressedTokenAccountsByDelegatePostRequestParams { - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - mint: options.as_ref().and_then(|o| o.mint.as_ref()).map(|x| x.to_string()), - delegate: delegate.to_string(), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressedTokenAccountsByDelegateV2BodyParams { + cursor: options.as_ref().and_then(|o| o.cursor.clone()).map(photon_api::types::Base58String), + limit: options.as_ref().and_then(|o| o.limit).map(|l| photon_api::types::Limit(l as u64)), + mint: options.as_ref().and_then(|o| o.mint.as_ref()).map(|x| photon_api::types::SerializablePubkey(x.to_string())), + delegate: photon_api::types::SerializablePubkey(delegate.to_string()), }; + let request = photon_api::apis::default_api::make_get_compressed_token_accounts_by_delegate_v2_body(params); let result = photon_api::apis::default_api::get_compressed_token_accounts_by_delegate_v2_post( &self.configuration, @@ -570,7 +562,9 @@ impl Indexer for PhotonIndexer { ) .await?; - let response = result.result.ok_or(IndexerError::AccountNotFound)?; + Self::check_api_error("get_compressed_token_accounts_by_delegate_v2", result.error)?; + let response = Self::extract_result("get_compressed_token_accounts_by_delegate_v2", result.result)?; + if response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -582,7 +576,7 @@ impl Indexer for PhotonIndexer { .map(CompressedTokenAccount::try_from) .collect(); - let cursor = response.value.cursor; + let cursor = response.value.cursor.map(|h| h.0); Ok(Response { context: Context { @@ -596,16 +590,17 @@ impl Indexer for PhotonIndexer { } #[cfg(not(feature = "v2"))] { - let request = photon_api::models::GetCompressedTokenAccountsByDelegatePostRequest { - params: Box::new( - photon_api::models::GetCompressedTokenAccountsByDelegatePostRequestParams { - delegate: delegate.to_string(), - mint: options.as_ref().and_then(|o| o.mint.as_ref()).map(|x| x.to_string()), - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressedTokenAccountsByDelegateBodyParams { + delegate: photon_api::types::SerializablePubkey(delegate.to_string()), + mint: options.as_ref().and_then(|o| o.mint.as_ref()).map(|x| photon_api::types::SerializablePubkey(x.to_string())), + cursor: options.as_ref().and_then(|o| o.cursor.clone()).map(photon_api::types::Base58String), + limit: options.as_ref().and_then(|o| o.limit).map(|l| photon_api::types::Limit(l as u64)), + }; + let request = photon_api::types::PostGetCompressedTokenAccountsByDelegateBody { + id: photon_api::types::PostGetCompressedTokenAccountsByDelegateBodyId::TestAccount, + jsonrpc: photon_api::types::PostGetCompressedTokenAccountsByDelegateBodyJsonrpc::X20, + method: photon_api::types::PostGetCompressedTokenAccountsByDelegateBodyMethod::GetCompressedTokenAccountsByDelegate, + params, }; let result = photon_api::apis::default_api::get_compressed_token_accounts_by_delegate_post( @@ -614,7 +609,9 @@ impl Indexer for PhotonIndexer { ) .await?; - let response = result.result.ok_or(IndexerError::AccountNotFound)?; + Self::check_api_error("get_compressed_token_accounts_by_delegate", result.error)?; + let response = Self::extract_result("get_compressed_token_accounts_by_delegate", result.result)?; + if response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -626,7 +623,7 @@ impl Indexer for PhotonIndexer { .map(CompressedTokenAccount::try_from) .collect(); - let cursor = response.value.cursor; + let cursor = response.value.cursor.map(|h| h.0); Ok(Response { context: Context { @@ -652,27 +649,26 @@ impl Indexer for PhotonIndexer { self.retry(config.retry_config, || async { #[cfg(feature = "v2")] { - let request = photon_api::models::GetCompressedTokenAccountsByOwnerV2PostRequest { - params: Box::from( - photon_api::models::GetCompressedTokenAccountsByOwnerPostRequestParams { - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - mint: options - .as_ref() - .and_then(|o| o.mint.as_ref()) - .map(|x| x.to_string()), - owner: owner.to_string(), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressedTokenAccountsByOwnerV2BodyParams { + cursor: options.as_ref().and_then(|o| o.cursor.clone()).map(photon_api::types::Base58String), + limit: options.as_ref().and_then(|o| o.limit).map(|l| photon_api::types::Limit(l as u64)), + mint: options + .as_ref() + .and_then(|o| o.mint.as_ref()) + .map(|x| photon_api::types::SerializablePubkey(x.to_string())), + owner: photon_api::types::SerializablePubkey(owner.to_string()), }; + let request = photon_api::apis::default_api::make_get_compressed_token_accounts_by_owner_v2_body(params); let result = photon_api::apis::default_api::get_compressed_token_accounts_by_owner_v2_post( &self.configuration, request, ) .await?; - let response = result.result.ok_or(IndexerError::AccountNotFound)?; + + Self::check_api_error("get_compressed_token_accounts_by_owner_v2", result.error)?; + let response = Self::extract_result("get_compressed_token_accounts_by_owner_v2", result.result)?; + if response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -683,7 +679,7 @@ impl Indexer for PhotonIndexer { .map(CompressedTokenAccount::try_from) .collect(); - let cursor = response.value.cursor; + let cursor = response.value.cursor.map(|h| h.0); Ok(Response { context: Context { @@ -697,19 +693,20 @@ impl Indexer for PhotonIndexer { } #[cfg(not(feature = "v2"))] { - let request = photon_api::models::GetCompressedTokenAccountsByOwnerPostRequest { - params: Box::new( - photon_api::models::GetCompressedTokenAccountsByOwnerPostRequestParams { - owner: owner.to_string(), - mint: options - .as_ref() - .and_then(|o| o.mint.as_ref()) - .map(|x| x.to_string()), - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressedTokenAccountsByOwnerBodyParams { + owner: photon_api::types::SerializablePubkey(owner.to_string()), + mint: options + .as_ref() + .and_then(|o| o.mint.as_ref()) + .map(|x| photon_api::types::SerializablePubkey(x.to_string())), + cursor: options.as_ref().and_then(|o| o.cursor.clone()).map(photon_api::types::Base58String), + limit: options.as_ref().and_then(|o| o.limit).map(|l| photon_api::types::Limit(l as u64)), + }; + let request = photon_api::types::PostGetCompressedTokenAccountsByOwnerBody { + id: photon_api::types::PostGetCompressedTokenAccountsByOwnerBodyId::TestAccount, + jsonrpc: photon_api::types::PostGetCompressedTokenAccountsByOwnerBodyJsonrpc::X20, + method: photon_api::types::PostGetCompressedTokenAccountsByOwnerBodyMethod::GetCompressedTokenAccountsByOwner, + params, }; let result = @@ -719,11 +716,9 @@ impl Indexer for PhotonIndexer { ) .await?; - let response = Self::extract_result_with_error_check( - "get_compressed_token_accounts_by_owner", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compressed_token_accounts_by_owner", result.error)?; + let response = Self::extract_result("get_compressed_token_accounts_by_owner", result.result)?; + if response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -734,7 +729,7 @@ impl Indexer for PhotonIndexer { .map(CompressedTokenAccount::try_from) .collect(); - let cursor = response.value.cursor; + let cursor = response.value.cursor.map(|h| h.0); Ok(Response { context: Context { @@ -760,20 +755,16 @@ impl Indexer for PhotonIndexer { self.retry(config.retry_config, || async { #[cfg(feature = "v2")] { - let request = photon_api::models::GetCompressedTokenBalancesByOwnerV2PostRequest { - params: Box::new( - photon_api::models::GetCompressedTokenAccountsByOwnerPostRequestParams { - owner: owner.to_string(), - mint: options - .as_ref() - .and_then(|o| o.mint.as_ref()) - .map(|x| x.to_string()), - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressedTokenBalancesByOwnerV2BodyParams { + owner: photon_api::types::SerializablePubkey(owner.to_string()), + mint: options + .as_ref() + .and_then(|o| o.mint.as_ref()) + .map(|x| photon_api::types::SerializablePubkey(x.to_string())), + cursor: options.as_ref().and_then(|o| o.cursor.clone()).map(photon_api::types::Base58String), + limit: options.as_ref().and_then(|o| o.limit).map(|l| photon_api::types::Limit(l as u64)), }; + let request = photon_api::apis::default_api::make_get_compressed_token_balances_by_owner_v2_body(params); let result = photon_api::apis::default_api::get_compressed_token_balances_by_owner_v2_post( @@ -782,11 +773,9 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compressed_token_balances_by_owner_v2", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compressed_token_balances_by_owner_v2", result.error)?; + let api_response = Self::extract_result("get_compressed_token_balances_by_owner_v2", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -804,25 +793,26 @@ impl Indexer for PhotonIndexer { }, value: ItemsWithCursor { items: token_balances?, - cursor: api_response.value.cursor, + cursor: api_response.value.cursor.map(|c| c.0), }, }) } #[cfg(not(feature = "v2"))] { - let request = photon_api::models::GetCompressedTokenBalancesByOwnerPostRequest { - params: Box::new( - photon_api::models::GetCompressedTokenAccountsByOwnerPostRequestParams { - owner: owner.to_string(), - mint: options - .as_ref() - .and_then(|o| o.mint.as_ref()) - .map(|x| x.to_string()), - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressedTokenBalancesByOwnerBodyParams { + owner: photon_api::types::SerializablePubkey(owner.to_string()), + mint: options + .as_ref() + .and_then(|o| o.mint.as_ref()) + .map(|x| photon_api::types::SerializablePubkey(x.to_string())), + cursor: options.as_ref().and_then(|o| o.cursor.clone()).map(photon_api::types::Base58String), + limit: options.as_ref().and_then(|o| o.limit).map(|l| photon_api::types::Limit(l as u64)), + }; + let request = photon_api::types::PostGetCompressedTokenBalancesByOwnerBody { + id: photon_api::types::PostGetCompressedTokenBalancesByOwnerBodyId::TestAccount, + jsonrpc: photon_api::types::PostGetCompressedTokenBalancesByOwnerBodyJsonrpc::X20, + method: photon_api::types::PostGetCompressedTokenBalancesByOwnerBodyMethod::GetCompressedTokenBalancesByOwner, + params, }; let result = @@ -832,11 +822,9 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compressed_token_balances_by_owner", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compressed_token_balances_by_owner", result.error)?; + let api_response = Self::extract_result("get_compressed_token_balances_by_owner", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -854,7 +842,7 @@ impl Indexer for PhotonIndexer { }, value: ItemsWithCursor { items: token_balances?, - cursor: api_response.value.cursor, + cursor: api_response.value.cursor.map(|c| c.0), }, }) } @@ -869,14 +857,13 @@ impl Indexer for PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetCompressionSignaturesForAccountPostRequest { - params: Box::new( - photon_api::models::GetCompressedAccountProofPostRequestParams { - hash: hash.to_base58(), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressionSignaturesForAccountBodyParams { + hash: photon_api::types::Hash(hash.to_base58()), }; + let request = + photon_api::apis::default_api::make_get_compression_signatures_for_account_body( + params, + ); let result = photon_api::apis::default_api::get_compression_signatures_for_account_post( @@ -885,20 +872,19 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compression_signatures_for_account", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compression_signatures_for_account", result.error)?; + let api_response = + Self::extract_result("get_compression_signatures_for_account", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } - let signatures = api_response + let signatures: Vec = api_response .value .items .iter() .map(SignatureWithMetadata::from) - .collect::>(); + .collect(); Ok(Response { context: Context { @@ -918,16 +904,18 @@ impl Indexer for PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetCompressionSignaturesForAddressPostRequest { - params: Box::new( - photon_api::models::GetCompressionSignaturesForAddressPostRequestParams { - address: address.to_base58(), - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressionSignaturesForAddressBodyParams { + address: photon_api::types::SerializablePubkey(address.to_base58()), + cursor: options.as_ref().and_then(|o| o.cursor.clone()), + limit: options + .as_ref() + .and_then(|o| o.limit) + .map(|l| photon_api::types::Limit(l as u64)), }; + let request = + photon_api::apis::default_api::make_get_compression_signatures_for_address_body( + params, + ); let result = photon_api::apis::default_api::get_compression_signatures_for_address_post( @@ -936,21 +924,20 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compression_signatures_for_address", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compression_signatures_for_address", result.error)?; + let api_response = + Self::extract_result("get_compression_signatures_for_address", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } - let signatures = api_response + let signatures: Vec = api_response .value .items .iter() .map(SignatureWithMetadata::from) - .collect::>(); + .collect(); let cursor = api_response.value.cursor; @@ -975,16 +962,18 @@ impl Indexer for PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetCompressionSignaturesForOwnerPostRequest { - params: Box::new( - photon_api::models::GetCompressionSignaturesForOwnerPostRequestParams { - owner: owner.to_string(), - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressionSignaturesForOwnerBodyParams { + owner: photon_api::types::SerializablePubkey(owner.to_string()), + cursor: options.as_ref().and_then(|o| o.cursor.clone()), + limit: options + .as_ref() + .and_then(|o| o.limit) + .map(|l| photon_api::types::Limit(l as u64)), }; + let request = + photon_api::apis::default_api::make_get_compression_signatures_for_owner_body( + params, + ); let result = photon_api::apis::default_api::get_compression_signatures_for_owner_post( &self.configuration, @@ -992,21 +981,20 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compression_signatures_for_owner", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compression_signatures_for_owner", result.error)?; + let api_response = + Self::extract_result("get_compression_signatures_for_owner", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } - let signatures = api_response + let signatures: Vec = api_response .value .items .iter() .map(SignatureWithMetadata::from) - .collect::>(); + .collect(); let cursor = api_response.value.cursor; @@ -1031,16 +1019,18 @@ impl Indexer for PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetCompressionSignaturesForTokenOwnerPostRequest { - params: Box::new( - photon_api::models::GetCompressionSignaturesForOwnerPostRequestParams { - owner: owner.to_string(), - cursor: options.as_ref().and_then(|o| o.cursor.clone()), - limit: options.as_ref().and_then(|o| o.limit), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetCompressionSignaturesForTokenOwnerBodyParams { + owner: photon_api::types::SerializablePubkey(owner.to_string()), + cursor: options.as_ref().and_then(|o| o.cursor.clone()), + limit: options + .as_ref() + .and_then(|o| o.limit) + .map(|l| photon_api::types::Limit(l as u64)), }; + let request = + photon_api::apis::default_api::make_get_compression_signatures_for_token_owner_body( + params, + ); let result = photon_api::apis::default_api::get_compression_signatures_for_token_owner_post( @@ -1049,21 +1039,20 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_compression_signatures_for_token_owner", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_compression_signatures_for_token_owner", result.error)?; + let api_response = + Self::extract_result("get_compression_signatures_for_token_owner", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } - let signatures = api_response + let signatures: Vec = api_response .value .items .iter() .map(SignatureWithMetadata::from) - .collect::>(); + .collect(); let cursor = api_response.value.cursor; @@ -1083,9 +1072,7 @@ impl Indexer for PhotonIndexer { async fn get_indexer_health(&self, config: Option) -> Result { let config = config.unwrap_or_default(); self.retry(config, || async { - let request = photon_api::models::GetIndexerHealthPostRequest { - ..Default::default() - }; + let request = photon_api::apis::default_api::make_get_indexer_health_body(); let result = photon_api::apis::default_api::get_indexer_health_post( &self.configuration, @@ -1093,11 +1080,9 @@ impl Indexer for PhotonIndexer { ) .await?; - let _api_response = Self::extract_result_with_error_check( - "get_indexer_health", - result.error, - result.result, - )?; + Self::check_api_error("get_indexer_health", result.error)?; + // result.result is not Optional for this endpoint + let _health = result.result; Ok(true) }) @@ -1107,20 +1092,15 @@ impl Indexer for PhotonIndexer { async fn get_indexer_slot(&self, config: Option) -> Result { let config = config.unwrap_or_default(); self.retry(config, || async { - let request = photon_api::models::GetIndexerSlotPostRequest { - ..Default::default() - }; + let request = photon_api::apis::default_api::make_get_indexer_slot_body(); let result = photon_api::apis::default_api::get_indexer_slot_post(&self.configuration, request) .await?; - let result = Self::extract_result_with_error_check( - "get_indexer_slot", - result.error, - result.result, - )?; - Ok(result) + Self::check_api_error("get_indexer_slot", result.error)?; + // result.result is u64 directly for this endpoint + Ok(result.result) }) .await } @@ -1134,14 +1114,14 @@ impl Indexer for PhotonIndexer { self.retry(config.retry_config, || async { let hashes_for_async = hashes.clone(); - let request: photon_api::models::GetMultipleCompressedAccountProofsPostRequest = - photon_api::models::GetMultipleCompressedAccountProofsPostRequest { - params: hashes_for_async - .into_iter() - .map(|hash| bs58::encode(hash).into_string()) - .collect(), - ..Default::default() - }; + let params: Vec = hashes_for_async + .into_iter() + .map(|hash| photon_api::types::Hash(bs58::encode(hash).into_string())) + .collect(); + let request = + photon_api::apis::default_api::make_get_multiple_compressed_account_proofs_body( + params, + ); let result = photon_api::apis::default_api::get_multiple_compressed_account_proofs_post( @@ -1150,22 +1130,10 @@ impl Indexer for PhotonIndexer { ) .await?; - if let Some(error) = &result.error { - let error_msg = error.message.as_deref().unwrap_or("Unknown error"); - let error_code = error.code.unwrap_or(0); - tracing::error!("API returned error: {}", error_msg); - return Err(IndexerError::PhotonError { - context: "get_multiple_compressed_account_proofs".to_string(), - message: format!("API Error (code {}): {}", error_code, error_msg), - }); - } + Self::check_api_error("get_multiple_compressed_account_proofs", result.error)?; + let photon_proofs = + Self::extract_result("get_multiple_compressed_account_proofs", result.result)?; - let photon_proofs = result.result.ok_or_else(|| { - IndexerError::missing_result( - "get_multiple_new_address_proofs", - "No result returned from Photon API", - ) - })?; if photon_proofs.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -1186,7 +1154,7 @@ impl Indexer for PhotonIndexer { let proof = proof_vec .iter() - .map(|x| Hash::from_base58(x)) + .map(|s| Hash::from_base58(s)) .collect::, IndexerError>>() .map_err(|e| IndexerError::Base58DecodeError { field: "proof".to_string(), @@ -1195,8 +1163,8 @@ impl Indexer for PhotonIndexer { Ok(MerkleProof { hash: <[u8; 32] as Base58Conversions>::from_base58(&x.hash)?, - leaf_index: x.leaf_index, - merkle_tree: Pubkey::from_str_const(x.merkle_tree.as_str()), + leaf_index: x.leaf_index as u64, + merkle_tree: Pubkey::from_str_const(x.merkle_tree.0.as_str()), proof, root_seq: x.root_seq, root: <[u8; 32] as Base58Conversions>::from_base58(&x.root)?, @@ -1224,15 +1192,20 @@ impl Indexer for PhotonIndexer { self.retry(config.retry_config, || async { let hashes = hashes.clone(); let addresses = addresses.clone(); - let request = photon_api::models::GetMultipleCompressedAccountsPostRequest { - params: Box::new( - photon_api::models::GetMultipleCompressedAccountsPostRequestParams { - addresses: addresses.map(|x| x.iter().map(|x| x.to_base58()).collect()), - hashes: hashes.map(|x| x.iter().map(|x| x.to_base58()).collect()), - }, - ), - ..Default::default() + let params = photon_api::types::PostGetMultipleCompressedAccountsBodyParams { + addresses: addresses.map(|x| { + x.iter() + .map(|a| photon_api::types::SerializablePubkey(a.to_base58())) + .collect() + }), + hashes: hashes.map(|x| { + x.iter() + .map(|h| photon_api::types::Hash(h.to_base58())) + .collect() + }), }; + let request = + photon_api::apis::default_api::make_get_multiple_compressed_accounts_body(params); let result = photon_api::apis::default_api::get_multiple_compressed_accounts_post( &self.configuration, @@ -1240,11 +1213,10 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_multiple_compressed_accounts", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_multiple_compressed_accounts", result.error)?; + let api_response = + Self::extract_result("get_multiple_compressed_accounts", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } @@ -1276,58 +1248,55 @@ impl Indexer for PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let params: Vec = addresses + let params: Vec = addresses .iter() - .map(|x| photon_api::models::address_with_tree::AddressWithTree { - address: bs58::encode(x).into_string(), - tree: bs58::encode(&merkle_tree_pubkey).into_string(), + .map(|x| photon_api::types::AddressWithTree { + address: photon_api::types::SerializablePubkey(bs58::encode(x).into_string()), + tree: photon_api::types::SerializablePubkey( + bs58::encode(&merkle_tree_pubkey).into_string(), + ), }) .collect(); - let request = photon_api::models::GetMultipleNewAddressProofsV2PostRequest { - params, - ..Default::default() - }; + let request = + photon_api::apis::default_api::make_get_multiple_new_address_proofs_v2_body(params); let result = photon_api::apis::default_api::get_multiple_new_address_proofs_v2_post( &self.configuration, request, ) - .await; + .await?; - let result = result?; + Self::check_api_error("get_multiple_new_address_proofs", result.error)?; + let api_response = + match Self::extract_result("get_multiple_new_address_proofs", result.result) { + Ok(proofs) => proofs, + Err(e) => { + error!("Failed to extract proofs: {:?}", e); + return Err(e); + } + }; - let api_response = match Self::extract_result_with_error_check( - "get_multiple_new_address_proofs", - result.error, - result.result.map(|r| *r), - ) { - Ok(proofs) => proofs, - Err(e) => { - error!("Failed to extract proofs: {:?}", e); - return Err(e); - } - }; if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } let photon_proofs = api_response.value; let mut proofs = Vec::new(); for photon_proof in photon_proofs { - let tree_pubkey = Hash::from_base58(&photon_proof.merkle_tree).map_err(|e| { + let tree_pubkey = Hash::from_base58(&photon_proof.merkle_tree.0).map_err(|e| { IndexerError::Base58DecodeError { field: "merkle_tree".to_string(), message: e.to_string(), } })?; - let low_address_value = Hash::from_base58(&photon_proof.lower_range_address) + let low_address_value = Hash::from_base58(&photon_proof.lower_range_address.0) .map_err(|e| IndexerError::Base58DecodeError { field: "lower_range_address".to_string(), message: e.to_string(), })?; - let next_address_value = Hash::from_base58(&photon_proof.higher_range_address) + let next_address_value = Hash::from_base58(&photon_proof.higher_range_address.0) .map_err(|e| IndexerError::Base58DecodeError { field: "higher_range_address".to_string(), message: e.to_string(), @@ -1336,7 +1305,7 @@ impl Indexer for PhotonIndexer { let mut proof_vec: Vec<[u8; 32]> = photon_proof .proof .iter() - .map(|x: &String| Hash::from_base58(x)) + .map(|x| Hash::from_base58(x)) .collect::, IndexerError>>()?; const ADDRESS_TREE_CANOPY_DEPTH: usize = 10; @@ -1360,9 +1329,9 @@ impl Indexer for PhotonIndexer { let proof = NewAddressProofWithContext { merkle_tree: tree_pubkey.into(), - low_address_index: photon_proof.low_element_leaf_index, + low_address_index: photon_proof.low_element_leaf_index as u64, low_address_value, - low_address_next_index: photon_proof.next_index, + low_address_next_index: photon_proof.next_index as u64, low_address_next_value: next_address_value, low_address_proof: proof_arr.to_vec(), root, @@ -1394,21 +1363,21 @@ impl Indexer for PhotonIndexer { self.retry(config.retry_config, || async { #[cfg(feature = "v2")] { - let request = photon_api::models::GetValidityProofV2PostRequest { - params: Box::new(photon_api::models::GetValidityProofPostRequestParams { - hashes: Some(hashes.iter().map(|x| x.to_base58()).collect()), - new_addresses_with_trees: Some( - new_addresses_with_trees - .iter() - .map(|x| photon_api::models::AddressWithTree { - address: x.address.to_base58(), - tree: x.tree.to_string(), - }) - .collect(), - ), - }), - ..Default::default() + let params = photon_api::types::PostGetValidityProofV2BodyParams { + hashes: hashes + .iter() + .map(|x| photon_api::types::Hash(x.to_base58())) + .collect(), + new_addresses_with_trees: new_addresses_with_trees + .iter() + .map(|x| photon_api::types::AddressWithTree { + address: photon_api::types::SerializablePubkey(x.address.to_base58()), + tree: photon_api::types::SerializablePubkey(x.tree.to_string()), + }) + .collect(), }; + let request = + photon_api::apis::default_api::make_get_validity_proof_v2_body(params); let result = photon_api::apis::default_api::get_validity_proof_v2_post( &self.configuration, @@ -1416,16 +1385,14 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_validity_proof_v2", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_validity_proof_v2", result.error)?; + let api_response = Self::extract_result("get_validity_proof_v2", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } let validity_proof = - super::types::ValidityProofWithContext::from_api_model_v2(*api_response.value)?; + super::types::ValidityProofWithContext::from_api_model_v2(api_response.value)?; Ok(Response { context: Context { @@ -1436,21 +1403,20 @@ impl Indexer for PhotonIndexer { } #[cfg(not(feature = "v2"))] { - let request = photon_api::models::GetValidityProofPostRequest { - params: Box::new(photon_api::models::GetValidityProofPostRequestParams { - hashes: Some(hashes.iter().map(|x| x.to_base58()).collect()), - new_addresses_with_trees: Some( - new_addresses_with_trees - .iter() - .map(|x| photon_api::models::AddressWithTree { - address: x.address.to_base58(), - tree: x.tree.to_string(), - }) - .collect(), - ), - }), - ..Default::default() + let params = photon_api::types::PostGetValidityProofBodyParams { + hashes: hashes + .iter() + .map(|x| photon_api::types::Hash(x.to_base58())) + .collect(), + new_addresses_with_trees: new_addresses_with_trees + .iter() + .map(|x| photon_api::types::AddressWithTree { + address: photon_api::types::SerializablePubkey(x.address.to_base58()), + tree: photon_api::types::SerializablePubkey(x.tree.to_string()), + }) + .collect(), }; + let request = photon_api::apis::default_api::make_get_validity_proof_body(params); let result = photon_api::apis::default_api::get_validity_proof_post( &self.configuration, @@ -1458,16 +1424,14 @@ impl Indexer for PhotonIndexer { ) .await?; - let api_response = Self::extract_result_with_error_check( - "get_validity_proof", - result.error, - result.result.map(|r| *r), - )?; + Self::check_api_error("get_validity_proof", result.error)?; + let api_response = Self::extract_result("get_validity_proof", result.result)?; + if api_response.context.slot < config.slot { return Err(IndexerError::IndexerNotSyncedToSlot); } let validity_proof = super::types::ValidityProofWithContext::from_api_model( - *api_response.value, + api_response.value, hashes.len(), )?; @@ -1488,9 +1452,8 @@ impl Indexer for PhotonIndexer { ) -> Result, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetQueueInfoPostRequest { - ..Default::default() - }; + let params = photon_api::types::PostGetQueueInfoBodyParams { trees: None }; + let request = photon_api::apis::default_api::make_get_queue_info_body(params); let result = photon_api::apis::default_api::get_queue_info_post(&self.configuration, request) @@ -1498,14 +1461,7 @@ impl Indexer for PhotonIndexer { let api_response = Self::extract_result_with_error_check( "get_queue_info", - result.error.map(|e| { - Box::new( - photon_api::models::GetBatchAddressUpdateInfoPost200ResponseError { - code: Some(e.code), - message: Some(e.message), - }, - ) - }), + result.error, result.result, )?; @@ -1544,242 +1500,205 @@ impl Indexer for PhotonIndexer { async fn get_queue_elements( &mut self, - _merkle_tree_pubkey: [u8; 32], - _options: super::QueueElementsV2Options, - _config: Option, + merkle_tree_pubkey: [u8; 32], + options: super::QueueElementsV2Options, + config: Option, ) -> Result, IndexerError> { - #[cfg(not(feature = "v2"))] - unimplemented!(); + let config = config.unwrap_or_default(); + self.retry(config.retry_config, || async { + let tree_hash = + photon_api::types::Hash(bs58::encode(&merkle_tree_pubkey).into_string()); - #[cfg(feature = "v2")] - { - use crate::indexer::OutputQueueData; - let merkle_tree_pubkey = _merkle_tree_pubkey; - let options = _options; - let config = _config.unwrap_or_default(); - self.retry(config.retry_config, || async { - // Build nested QueueRequest objects for the new API format - let output_queue = options.output_queue_limit.map(|limit| { - let mut req = photon_api::models::QueueRequest::new(limit); - req.start_index = options.output_queue_start_index; - req.zkp_batch_size = options.output_queue_zkp_batch_size; - req - }); - - let input_queue = options.input_queue_limit.map(|limit| { - let mut req = photon_api::models::QueueRequest::new(limit); - req.start_index = options.input_queue_start_index; - req.zkp_batch_size = options.input_queue_zkp_batch_size; - req - }); - - let address_queue = options.address_queue_limit.map(|limit| { - let mut req = photon_api::models::QueueRequest::new(limit); - req.start_index = options.address_queue_start_index; - req.zkp_batch_size = options.address_queue_zkp_batch_size; - req - }); - - let mut params = photon_api::models::GetQueueElementsPostRequestParams::new( - bs58::encode(merkle_tree_pubkey).into_string(), - ); - params.output_queue = output_queue; - params.input_queue = input_queue; - params.address_queue = address_queue; + // Build queue request objects + let output_queue = if options.output_queue_limit.is_some() + || options.output_queue_start_index.is_some() + { + Some(photon_api::types::QueueRequest { + limit: options.output_queue_limit.unwrap_or(100), + start_index: options.output_queue_start_index, + zkp_batch_size: options.output_queue_zkp_batch_size, + }) + } else { + None + }; - let request = photon_api::models::GetQueueElementsPostRequest { - params: Box::new(params), - ..Default::default() - }; + let input_queue = if options.input_queue_limit.is_some() + || options.input_queue_start_index.is_some() + { + Some(photon_api::types::QueueRequest { + limit: options.input_queue_limit.unwrap_or(100), + start_index: options.input_queue_start_index, + zkp_batch_size: options.input_queue_zkp_batch_size, + }) + } else { + None + }; - tracing::info!( - "get_queue_elements request: output_queue={:?}, input_queue={:?}", - request.params.output_queue.as_ref().map(|q| ( - q.limit, - q.start_index, - q.zkp_batch_size - )), - request.params.input_queue.as_ref().map(|q| ( - q.limit, - q.start_index, - q.zkp_batch_size - )), - ); + let address_queue = if options.address_queue_limit.is_some() + || options.address_queue_start_index.is_some() + { + Some(photon_api::types::QueueRequest { + limit: options.address_queue_limit.unwrap_or(100), + start_index: options.address_queue_start_index, + zkp_batch_size: options.address_queue_zkp_batch_size, + }) + } else { + None + }; - let result = photon_api::apis::default_api::get_queue_elements_post( - &self.configuration, - request, - ) - .await?; + let params = photon_api::types::PostGetQueueElementsBodyParams { + tree: tree_hash, + output_queue, + input_queue, + address_queue, + }; + let request = photon_api::apis::default_api::make_get_queue_elements_body(params); - let api_response = Self::extract_result_with_error_check( - "get_queue_elements", - result.error, - result.result.map(|r| *r), - )?; + let result = photon_api::apis::default_api::get_queue_elements_post( + &self.configuration, + request, + ) + .await?; - if api_response.context.slot < config.slot { - return Err(IndexerError::IndexerNotSyncedToSlot); - } + Self::check_api_error("get_queue_elements", result.error)?; + let api_response = Self::extract_result("get_queue_elements", result.result)?; - let state_queue = if let Some(state) = api_response.state_queue { - // Extract nodes and node_hashes from combined Node objects - let nodes: Vec = state.nodes.iter().map(|n| n.index).collect(); - let node_hashes: Result, IndexerError> = state - .nodes - .iter() - .map(|n| Hash::from_base58(&n.hash)) - .collect(); - let initial_root = Hash::from_base58(&state.initial_root)?; + if api_response.context.slot < config.slot { + return Err(IndexerError::IndexerNotSyncedToSlot); + } - let output_queue = if let Some(output) = state.output_queue { - let account_hashes: Result, IndexerError> = output + // Convert API StateQueueData to local StateQueueData + let state_queue = if let Some(sq) = api_response.state_queue { + let output_queue = if let Some(oq) = sq.output_queue { + Some(super::OutputQueueData { + leaf_indices: oq.leaf_indices.clone(), + account_hashes: oq .account_hashes .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - let old_leaves: Result, IndexerError> = - output.leaves.iter().map(|h| Hash::from_base58(h)).collect(); - let leaves_hash_chains: Result, IndexerError> = output + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + old_leaves: oq + .leaves + .iter() + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + first_queue_index: oq.first_queue_index, + next_index: oq.next_index, + leaves_hash_chains: oq .leaves_hash_chains .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - - Some(OutputQueueData { - leaf_indices: output.leaf_indices, - account_hashes: account_hashes?, - old_leaves: old_leaves?, - first_queue_index: output.first_queue_index, - next_index: output.next_index, - leaves_hash_chains: leaves_hash_chains?, - }) - } else { - None - }; + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + }) + } else { + None + }; - let input_queue = if let Some(input) = state.input_queue { - let account_hashes: Result, IndexerError> = input + let input_queue = if let Some(iq) = sq.input_queue { + Some(super::InputQueueData { + leaf_indices: iq.leaf_indices.clone(), + account_hashes: iq .account_hashes .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - let current_leaves: Result, IndexerError> = - input.leaves.iter().map(|h| Hash::from_base58(h)).collect(); - let tx_hashes: Result, IndexerError> = input + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + current_leaves: iq + .leaves + .iter() + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + tx_hashes: iq .tx_hashes .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - let nullifiers: Result, IndexerError> = input + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + nullifiers: iq .nullifiers .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - let leaves_hash_chains: Result, IndexerError> = input + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + first_queue_index: iq.first_queue_index, + leaves_hash_chains: iq .leaves_hash_chains .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - - Some(super::InputQueueData { - leaf_indices: input.leaf_indices, - account_hashes: account_hashes?, - current_leaves: current_leaves?, - tx_hashes: tx_hashes?, - nullifiers: nullifiers?, - first_queue_index: input.first_queue_index, - leaves_hash_chains: leaves_hash_chains?, - }) - } else { - None - }; - - Some(super::StateQueueData { - nodes, - node_hashes: node_hashes?, - initial_root, - root_seq: state.root_seq, - output_queue, - input_queue, + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, }) } else { None }; - // Transform AddressQueueDataV2 - let address_queue = if let Some(address) = api_response.address_queue { - let addresses: Result, IndexerError> = address - .addresses + Some(super::StateQueueData { + nodes: sq.nodes.iter().map(|n| n.index).collect(), + node_hashes: sq + .nodes .iter() - .map(|h| Hash::from_base58(h)) - .collect(); + .map(|n| super::base58::decode_base58_to_fixed_array(&n.hash.0)) + .collect::, _>>()?, + initial_root: super::base58::decode_base58_to_fixed_array(&sq.initial_root.0)?, + root_seq: sq.root_seq, + output_queue, + input_queue, + }) + } else { + None + }; - let low_element_values: Result, IndexerError> = address + // Convert API AddressQueueData to local AddressQueueData + let address_queue = if let Some(aq) = api_response.address_queue { + Some(super::AddressQueueData { + addresses: aq + .addresses + .iter() + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + low_element_values: aq .low_element_values .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - - let low_element_next_values: Result, IndexerError> = address + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + low_element_next_values: aq .low_element_next_values .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - - // Extract nodes and node_hashes from combined Node objects - // Proofs are reconstructed from nodes using AddressQueueDataV2::reconstruct_proof() - let nodes: Vec = address.nodes.iter().map(|n| n.index).collect(); - let node_hashes: Result, IndexerError> = address + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + low_element_indices: aq.low_element_indices.clone(), + low_element_next_indices: aq.low_element_next_indices.clone(), + nodes: aq.nodes.iter().map(|n| n.index).collect(), + node_hashes: aq .nodes .iter() - .map(|n| Hash::from_base58(&n.hash)) - .collect(); - - let initial_root = Hash::from_base58(&address.initial_root)?; - - let leaves_hash_chains: Result, IndexerError> = address + .map(|n| super::base58::decode_base58_to_fixed_array(&n.hash.0)) + .collect::, _>>()?, + initial_root: super::base58::decode_base58_to_fixed_array(&aq.initial_root.0)?, + leaves_hash_chains: aq .leaves_hash_chains .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - - let subtrees: Result, IndexerError> = address + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + subtrees: aq .subtrees .iter() - .map(|h| Hash::from_base58(h)) - .collect(); - - Some(super::AddressQueueData { - addresses: addresses?, - low_element_values: low_element_values?, - low_element_next_values: low_element_next_values?, - low_element_indices: address.low_element_indices, - low_element_next_indices: address.low_element_next_indices, - nodes, - node_hashes: node_hashes?, - initial_root, - leaves_hash_chains: leaves_hash_chains?, - subtrees: subtrees?, - start_index: address.start_index, - root_seq: address.root_seq, - }) - } else { - None - }; - - Ok(Response { - context: Context { - slot: api_response.context.slot, - }, - value: super::QueueElementsResult { - state_queue, - address_queue, - }, + .map(|h| super::base58::decode_base58_to_fixed_array(&h.0)) + .collect::, _>>()?, + start_index: aq.start_index, + root_seq: aq.root_seq, }) + } else { + None + }; + + Ok(Response { + context: Context { + slot: api_response.context.slot, + }, + value: super::QueueElementsResult { + state_queue, + address_queue, + }, }) - .await - } + }) + .await } async fn get_subtrees( @@ -1809,9 +1728,10 @@ impl PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetAccountInterfacePostRequest::new( - photon_api::models::GetAccountInterfacePostRequestParams::new(address.to_string()), - ); + let params = photon_api::types::PostGetAccountInterfaceBodyParams { + address: photon_api::types::SerializablePubkey(address.to_string()), + }; + let request = photon_api::apis::default_api::make_get_account_interface_body(params); let result = photon_api::apis::default_api::get_account_interface_post( &self.configuration, @@ -1822,7 +1742,7 @@ impl PhotonIndexer { let api_response = Self::extract_result_with_error_check( "get_account_interface", result.error, - result.result.map(|r| *r), + result.result, )?; if api_response.context.slot < config.slot { @@ -1830,7 +1750,7 @@ impl PhotonIndexer { } let account = match api_response.value { - Some(boxed) => Some(AccountInterface::try_from(boxed.as_ref())?), + Some(ref ai) => Some(AccountInterface::try_from(ai)?), None => None, }; @@ -1853,11 +1773,11 @@ impl PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetTokenAccountInterfacePostRequest::new( - photon_api::models::GetTokenAccountInterfacePostRequestParams::new( - address.to_string(), - ), - ); + let params = photon_api::types::PostGetTokenAccountInterfaceBodyParams { + address: photon_api::types::SerializablePubkey(address.to_string()), + }; + let request = + photon_api::apis::default_api::make_get_token_account_interface_body(params); let result = photon_api::apis::default_api::get_token_account_interface_post( &self.configuration, @@ -1868,7 +1788,7 @@ impl PhotonIndexer { let api_response = Self::extract_result_with_error_check( "get_token_account_interface", result.error, - result.result.map(|r| *r), + result.result, )?; if api_response.context.slot < config.slot { @@ -1876,7 +1796,7 @@ impl PhotonIndexer { } let account = match api_response.value { - Some(boxed) => Some(TokenAccountInterface::try_from(boxed.as_ref())?), + Some(ref tai) => Some(TokenAccountInterface::try_from(tai)?), None => None, }; @@ -1900,12 +1820,11 @@ impl PhotonIndexer { ) -> Result>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let request = photon_api::models::GetAtaInterfacePostRequest::new( - photon_api::models::GetAtaInterfacePostRequestParams::new( - owner.to_string(), - mint.to_string(), - ), - ); + let params = photon_api::types::PostGetAtaInterfaceBodyParams { + owner: photon_api::types::SerializablePubkey(owner.to_string()), + mint: photon_api::types::SerializablePubkey(mint.to_string()), + }; + let request = photon_api::apis::default_api::make_get_ata_interface_body(params); let result = photon_api::apis::default_api::get_ata_interface_post(&self.configuration, request) @@ -1914,7 +1833,7 @@ impl PhotonIndexer { let api_response = Self::extract_result_with_error_check( "get_associated_token_account_interface", result.error, - result.result.map(|r| *r), + result.result, )?; if api_response.context.slot < config.slot { @@ -1922,7 +1841,7 @@ impl PhotonIndexer { } let account = match api_response.value { - Some(boxed) => Some(TokenAccountInterface::try_from(boxed.as_ref())?), + Some(ref tai) => Some(TokenAccountInterface::try_from(tai)?), None => None, }; @@ -1945,14 +1864,14 @@ impl PhotonIndexer { ) -> Result>>, IndexerError> { let config = config.unwrap_or_default(); self.retry(config.retry_config, || async { - let address_strings: Vec = - addresses.iter().map(|addr| addr.to_string()).collect(); - - let request = photon_api::models::GetMultipleAccountInterfacesPostRequest::new( - photon_api::models::GetMultipleAccountInterfacesPostRequestParams::new( - address_strings, - ), - ); + let params = photon_api::types::PostGetMultipleAccountInterfacesBodyParams { + addresses: addresses + .iter() + .map(|addr| photon_api::types::SerializablePubkey(addr.to_string())) + .collect(), + }; + let request = + photon_api::apis::default_api::make_get_multiple_account_interfaces_body(params); let result = photon_api::apis::default_api::get_multiple_account_interfaces_post( &self.configuration, @@ -1963,7 +1882,7 @@ impl PhotonIndexer { let api_response = Self::extract_result_with_error_check( "get_multiple_account_interfaces", result.error, - result.result.map(|r| *r), + result.result, )?; if api_response.context.slot < config.slot { diff --git a/sdk-libs/client/src/indexer/types/account.rs b/sdk-libs/client/src/indexer/types/account.rs index 9976bbdc24..3c0ab5eaa8 100644 --- a/sdk-libs/client/src/indexer/types/account.rs +++ b/sdk-libs/client/src/indexer/types/account.rs @@ -87,14 +87,14 @@ impl From for CompressedAccountWithMerkleContext { } } -impl TryFrom<&photon_api::models::AccountV2> for CompressedAccount { +impl TryFrom<&photon_api::types::AccountV2> for CompressedAccount { type Error = IndexerError; - fn try_from(account: &photon_api::models::AccountV2) -> Result { + fn try_from(account: &photon_api::types::AccountV2) -> Result { let data = if let Some(data) = &account.data { Ok::, IndexerError>(Some(CompressedAccountData { - discriminator: data.discriminator.to_le_bytes(), - data: base64::decode_config(&data.data, base64::STANDARD_NO_PAD) + discriminator: (*data.discriminator).to_le_bytes(), + data: base64::decode_config(&*data.data, base64::STANDARD_NO_PAD) .map_err(|e| IndexerError::decode_error("data", e))?, data_hash: decode_base58_to_fixed_array(&data.data_hash)?, })) @@ -125,7 +125,7 @@ impl TryFrom<&photon_api::models::AccountV2> for CompressedAccount { .merkle_context .next_tree_context .as_ref() - .map(|ctx| NextTreeInfo::try_from(ctx.as_ref())) + .map(NextTreeInfo::try_from) .transpose()?, }; @@ -134,24 +134,24 @@ impl TryFrom<&photon_api::models::AccountV2> for CompressedAccount { address, data, hash, - lamports: account.lamports, - leaf_index: account.leaf_index, - seq: account.seq, - slot_created: account.slot_created, + lamports: *account.lamports, + leaf_index: *account.leaf_index as u32, + seq: account.seq.as_ref().map(|s| **s), + slot_created: *account.slot_created, tree_info, prove_by_index: account.prove_by_index, }) } } -impl TryFrom<&photon_api::models::Account> for CompressedAccount { +impl TryFrom<&photon_api::types::Account> for CompressedAccount { type Error = IndexerError; - fn try_from(account: &photon_api::models::Account) -> Result { + fn try_from(account: &photon_api::types::Account) -> Result { let data = if let Some(data) = &account.data { Ok::, IndexerError>(Some(CompressedAccountData { - discriminator: data.discriminator.to_le_bytes(), - data: base64::decode_config(&data.data, base64::STANDARD_NO_PAD) + discriminator: (*data.discriminator).to_le_bytes(), + data: base64::decode_config(&*data.data, base64::STANDARD_NO_PAD) .map_err(|e| IndexerError::decode_error("data", e))?, data_hash: decode_base58_to_fixed_array(&data.data_hash)?, })) @@ -165,14 +165,14 @@ impl TryFrom<&photon_api::models::Account> for CompressedAccount { .map(|address| decode_base58_to_fixed_array(address)) .transpose()?; let hash = decode_base58_to_fixed_array(&account.hash)?; - let seq = account.seq; - let slot_created = account.slot_created; - let lamports = account.lamports; - let leaf_index = account.leaf_index; + let seq = account.seq.as_ref().map(|s| **s); + let slot_created = *account.slot_created; + let lamports = *account.lamports; + let leaf_index = *account.leaf_index as u32; let tree_info = QUEUE_TREE_MAPPING - .get(&account.tree) + .get(&*account.tree) .ok_or(IndexerError::MissingResult { context: "conversion".into(), message: "expected value was None".into(), diff --git a/sdk-libs/client/src/indexer/types/interface.rs b/sdk-libs/client/src/indexer/types/interface.rs index 1a13df1959..72abeef304 100644 --- a/sdk-libs/client/src/indexer/types/interface.rs +++ b/sdk-libs/client/src/indexer/types/interface.rs @@ -47,56 +47,66 @@ pub enum ColdContext { /// Decode tree info from photon_api format fn decode_tree_info( - tree_info: &photon_api::models::InterfaceTreeInfo, + tree_info: &photon_api::types::TreeInfo, ) -> Result { let tree = Pubkey::new_from_array(decode_base58_to_fixed_array(&tree_info.tree)?); let queue = Pubkey::new_from_array(decode_base58_to_fixed_array(&tree_info.queue)?); let tree_type = match tree_info.tree_type { - photon_api::models::TreeType::StateV1 => TreeType::StateV1, - photon_api::models::TreeType::StateV2 => TreeType::StateV2, + photon_api::types::TreeType::StateV1 => TreeType::StateV1, + photon_api::types::TreeType::StateV2 => TreeType::StateV2, }; Ok(InterfaceTreeInfo { tree, queue, tree_type, - seq: tree_info.seq, - slot_created: tree_info.slot_created, + seq: tree_info.seq.as_ref().map(|s| **s), + slot_created: *tree_info.slot_created, }) } -/// Decode cold data from photon_api format -fn decode_cold_data(data: &photon_api::models::ColdData) -> Result { +/// Decode cold data from photon_api format. +fn decode_cold_data(data: &photon_api::types::ColdData) -> Result { + if data.discriminator.len() != 8 { + return Err(IndexerError::decode_error( + "discriminator", + format!("expected 8 bytes, got {}", data.discriminator.len()), + )); + } + let mut discriminator = [0u8; 8]; + for (i, &val) in data.discriminator.iter().enumerate() { + discriminator[i] = val as u8; + } Ok(ColdData { - discriminator: data.discriminator, - data: base64::decode_config(&data.data, base64::STANDARD_NO_PAD) + discriminator, + data: base64::decode_config(&*data.data, base64::STANDARD_NO_PAD) .map_err(|e| IndexerError::decode_error("data", e))?, }) } /// Helper to convert photon_api ColdContext to client ColdContext fn convert_cold_context( - cold: &photon_api::models::ColdContext, + cold: &photon_api::types::ColdContext, ) -> Result { match cold { - photon_api::models::ColdContext::Account { + photon_api::types::ColdContext::Account { hash, leaf_index, tree_info, data, } => Ok(ColdContext::Account { hash: decode_base58_to_fixed_array(hash)?, - leaf_index: *leaf_index, + leaf_index: **leaf_index, tree_info: decode_tree_info(tree_info)?, data: decode_cold_data(data)?, }), - photon_api::models::ColdContext::Token { + photon_api::types::ColdContext::Token { hash, leaf_index, tree_info, data, } => Ok(ColdContext::Token { hash: decode_base58_to_fixed_array(hash)?, - leaf_index: *leaf_index, + leaf_index: **leaf_index, tree_info: decode_tree_info(tree_info)?, data: decode_cold_data(data)?, }), @@ -128,43 +138,70 @@ impl AccountInterface { /// Helper to convert photon_api AccountInterface to client AccountInterface fn convert_account_interface( - ai: &photon_api::models::AccountInterface, + ai: &photon_api::types::AccountInterface, ) -> Result { let cold = ai.cold.as_ref().map(convert_cold_context).transpose()?; - let data = base64::decode_config(&ai.account.data, base64::STANDARD_NO_PAD) + let data = base64::decode_config(&*ai.account.data, base64::STANDARD_NO_PAD) .map_err(|e| IndexerError::decode_error("account.data", e))?; Ok(AccountInterface { key: Pubkey::new_from_array(decode_base58_to_fixed_array(&ai.key)?), account: Account { - lamports: ai.account.lamports, + lamports: *ai.account.lamports, data, owner: Pubkey::new_from_array(decode_base58_to_fixed_array(&ai.account.owner)?), executable: ai.account.executable, - rent_epoch: ai.account.rent_epoch, + rent_epoch: *ai.account.rent_epoch, }, cold, }) } -impl TryFrom<&photon_api::models::AccountInterface> for AccountInterface { +/// Helper to convert flattened interface fields (from TokenAccountInterface or InterfaceResult variants) +/// into a client AccountInterface +fn convert_flattened_account_interface( + key: &photon_api::types::SerializablePubkey, + account: &photon_api::types::SolanaAccountData, + cold: &Option, +) -> Result { + let cold = cold.as_ref().map(convert_cold_context).transpose()?; + + let data = base64::decode_config(&*account.data, base64::STANDARD_NO_PAD) + .map_err(|e| IndexerError::decode_error("account.data", e))?; + + Ok(AccountInterface { + key: Pubkey::new_from_array(decode_base58_to_fixed_array(key)?), + account: Account { + lamports: *account.lamports, + data, + owner: Pubkey::new_from_array(decode_base58_to_fixed_array(&account.owner)?), + executable: account.executable, + rent_epoch: *account.rent_epoch, + }, + cold, + }) +} + +impl TryFrom<&photon_api::types::AccountInterface> for AccountInterface { type Error = IndexerError; - fn try_from(ai: &photon_api::models::AccountInterface) -> Result { + fn try_from(ai: &photon_api::types::AccountInterface) -> Result { convert_account_interface(ai) } } -impl TryFrom<&photon_api::models::InterfaceResult> for AccountInterface { +impl TryFrom<&photon_api::types::InterfaceResult> for AccountInterface { type Error = IndexerError; - fn try_from(ir: &photon_api::models::InterfaceResult) -> Result { + fn try_from(ir: &photon_api::types::InterfaceResult) -> Result { match ir { - photon_api::models::InterfaceResult::Account(ai) => AccountInterface::try_from(ai), - photon_api::models::InterfaceResult::Token(tai) => { - AccountInterface::try_from(&tai.account) - } + photon_api::types::InterfaceResult::Variant0 { + key, account, cold, .. + } => convert_flattened_account_interface(key, account, cold), + photon_api::types::InterfaceResult::Variant1 { + key, account, cold, .. + } => convert_flattened_account_interface(key, account, cold), } } } @@ -178,40 +215,43 @@ pub struct TokenAccountInterface { pub token: TokenData, } -impl TryFrom<&photon_api::models::TokenAccountInterface> for TokenAccountInterface { - type Error = IndexerError; +/// Parse token data from photon_api TokenData +fn parse_interface_token_data( + td: &photon_api::types::TokenData, +) -> Result { + Ok(TokenData { + mint: Pubkey::new_from_array(decode_base58_to_fixed_array(&td.mint)?), + owner: Pubkey::new_from_array(decode_base58_to_fixed_array(&td.owner)?), + amount: *td.amount, + delegate: td + .delegate + .as_ref() + .map(|d| decode_base58_to_fixed_array(d).map(Pubkey::new_from_array)) + .transpose()?, + state: match td.state { + photon_api::types::AccountState::Initialized => AccountState::Initialized, + photon_api::types::AccountState::Frozen => AccountState::Frozen, + }, + tlv: td + .tlv + .as_ref() + .map(|tlv| { + let bytes = base64::decode_config(&**tlv, base64::STANDARD_NO_PAD) + .map_err(|e| IndexerError::decode_error("tlv", e))?; + Vec::::deserialize(&mut bytes.as_slice()) + .map_err(|e| IndexerError::decode_error("extensions", e)) + }) + .transpose()?, + }) +} - fn try_from(tai: &photon_api::models::TokenAccountInterface) -> Result { - let account = convert_account_interface(&tai.account)?; - - // Parse token data - same pattern as CompressedTokenAccount - let token = TokenData { - mint: Pubkey::new_from_array(decode_base58_to_fixed_array(&tai.token_data.mint)?), - owner: Pubkey::new_from_array(decode_base58_to_fixed_array(&tai.token_data.owner)?), - amount: tai.token_data.amount, - delegate: tai - .token_data - .delegate - .as_ref() - .map(|d| decode_base58_to_fixed_array(d).map(Pubkey::new_from_array)) - .transpose()?, - state: match tai.token_data.state { - photon_api::models::AccountState::Initialized => AccountState::Initialized, - photon_api::models::AccountState::Frozen => AccountState::Frozen, - }, - tlv: tai - .token_data - .tlv - .as_ref() - .map(|tlv| { - let bytes = base64::decode_config(tlv, base64::STANDARD_NO_PAD) - .map_err(|e| IndexerError::decode_error("tlv", e))?; - Vec::::deserialize(&mut bytes.as_slice()) - .map_err(|e| IndexerError::decode_error("extensions", e)) - }) - .transpose()?, - }; +impl TryFrom<&photon_api::types::TokenAccountInterface> for TokenAccountInterface { + type Error = IndexerError; + fn try_from(tai: &photon_api::types::TokenAccountInterface) -> Result { + // TokenAccountInterface has flattened AccountInterface fields + token_data + let account = convert_flattened_account_interface(&tai.key, &tai.account, &tai.cold)?; + let token = parse_interface_token_data(&tai.token_data)?; Ok(TokenAccountInterface { account, token }) } } diff --git a/sdk-libs/client/src/indexer/types/proof.rs b/sdk-libs/client/src/indexer/types/proof.rs index 94182baab2..0b45e00986 100644 --- a/sdk-libs/client/src/indexer/types/proof.rs +++ b/sdk-libs/client/src/indexer/types/proof.rs @@ -8,6 +8,21 @@ use super::{ tree::TreeInfo, }; +/// Convert a Vec (byte array from JSON) to a fixed-size byte array. +fn vec_i64_to_fixed_array(v: &[i64]) -> Result<[u8; N], IndexerError> { + if v.len() != N { + return Err(IndexerError::decode_error( + "proof", + format!("expected {} bytes, got {}", N, v.len()), + )); + } + let mut arr = [0u8; N]; + for (i, &val) in v.iter().enumerate() { + arr[i] = val as u8; + } + Ok(arr) +} + #[derive(Debug, Clone, PartialEq, Default)] pub struct MerkleProofWithContext { pub proof: Vec<[u8; 32]>, @@ -121,13 +136,13 @@ impl RootIndex { impl AccountProofInputs { pub fn from_api_model( - value: &photon_api::models::AccountProofInputs, + value: &photon_api::types::AccountProofInputs, ) -> Result { let root_index = { if value.root_index.prove_by_index { RootIndex::new_none() } else { - RootIndex::new_some(value.root_index.root_index) + RootIndex::new_some(value.root_index.root_index as u16) } }; Ok(Self { @@ -150,7 +165,7 @@ pub struct AddressProofInputs { impl AddressProofInputs { pub fn from_api_model( - value: &photon_api::models::AddressProofInputs, + value: &photon_api::types::AddressProofInputs, ) -> Result { Ok(Self { address: decode_base58_to_fixed_array(&value.address)?, @@ -239,25 +254,13 @@ impl ValidityProofWithContext { } pub fn from_api_model( - value: photon_api::models::CompressedProofWithContext, + value: photon_api::types::CompressedProofWithContext, num_hashes: usize, ) -> Result { let proof = ValidityProof::new(Some(CompressedProof { - a: value - .compressed_proof - .a - .try_into() - .map_err(|_| IndexerError::decode_error("proof.a", "invalid length"))?, - b: value - .compressed_proof - .b - .try_into() - .map_err(|_| IndexerError::decode_error("proof.b", "invalid length"))?, - c: value - .compressed_proof - .c - .try_into() - .map_err(|_| IndexerError::decode_error("proof.c", "invalid length"))?, + a: vec_i64_to_fixed_array(&value.compressed_proof.a)?, + b: vec_i64_to_fixed_array(&value.compressed_proof.b)?, + c: vec_i64_to_fixed_array(&value.compressed_proof.c)?, })); // Convert account data from V1 flat arrays to V2 structured format @@ -331,22 +334,13 @@ impl ValidityProofWithContext { } pub fn from_api_model_v2( - value: photon_api::models::CompressedProofWithContextV2, + value: photon_api::types::CompressedProofWithContextV2, ) -> Result { let proof = if let Some(proof) = value.compressed_proof { ValidityProof::new(Some(CompressedProof { - a: proof - .a - .try_into() - .map_err(|_| IndexerError::decode_error("proof.a", "invalid length"))?, - b: proof - .b - .try_into() - .map_err(|_| IndexerError::decode_error("proof.b", "invalid length"))?, - c: proof - .c - .try_into() - .map_err(|_| IndexerError::decode_error("proof.c", "invalid length"))?, + a: vec_i64_to_fixed_array(&proof.a)?, + b: vec_i64_to_fixed_array(&proof.b)?, + c: vec_i64_to_fixed_array(&proof.c)?, })) } else { ValidityProof::new(None) diff --git a/sdk-libs/client/src/indexer/types/signature.rs b/sdk-libs/client/src/indexer/types/signature.rs index 6ec82b8f1d..6b66676bf8 100644 --- a/sdk-libs/client/src/indexer/types/signature.rs +++ b/sdk-libs/client/src/indexer/types/signature.rs @@ -5,12 +5,12 @@ pub struct SignatureWithMetadata { pub slot: u64, } -impl From<&photon_api::models::SignatureInfo> for SignatureWithMetadata { - fn from(sig_info: &photon_api::models::SignatureInfo) -> Self { +impl From<&photon_api::types::SignatureInfo> for SignatureWithMetadata { + fn from(sig_info: &photon_api::types::SignatureInfo) -> Self { SignatureWithMetadata { - block_time: sig_info.block_time, - signature: sig_info.signature.clone(), - slot: sig_info.slot, + block_time: *sig_info.block_time as u64, + signature: sig_info.signature.0.clone(), + slot: *sig_info.slot, } } } diff --git a/sdk-libs/client/src/indexer/types/token.rs b/sdk-libs/client/src/indexer/types/token.rs index f2a9c63656..92903d234f 100644 --- a/sdk-libs/client/src/indexer/types/token.rs +++ b/sdk-libs/client/src/indexer/types/token.rs @@ -17,25 +17,25 @@ pub struct CompressedTokenAccount { pub account: CompressedAccount, } -fn parse_token_data(td: &photon_api::models::TokenData) -> Result { +fn parse_token_data(td: &photon_api::types::TokenData) -> Result { Ok(TokenData { mint: Pubkey::new_from_array(decode_base58_to_fixed_array(&td.mint)?), owner: Pubkey::new_from_array(decode_base58_to_fixed_array(&td.owner)?), - amount: td.amount, + amount: *td.amount, delegate: td .delegate .as_ref() .map(|d| decode_base58_to_fixed_array(d).map(Pubkey::new_from_array)) .transpose()?, state: match td.state { - photon_api::models::AccountState::Initialized => AccountState::Initialized, - photon_api::models::AccountState::Frozen => AccountState::Frozen, + photon_api::types::AccountState::Initialized => AccountState::Initialized, + photon_api::types::AccountState::Frozen => AccountState::Frozen, }, tlv: td .tlv .as_ref() .map(|tlv| { - let bytes = base64::decode_config(tlv, base64::STANDARD_NO_PAD) + let bytes = base64::decode_config(&**tlv, base64::STANDARD_NO_PAD) .map_err(|e| IndexerError::decode_error("tlv", e))?; Vec::::deserialize(&mut bytes.as_slice()) .map_err(|e| IndexerError::decode_error("extensions", e)) @@ -44,21 +44,21 @@ fn parse_token_data(td: &photon_api::models::TokenData) -> Result for CompressedTokenAccount { +impl TryFrom<&photon_api::types::TokenAccount> for CompressedTokenAccount { type Error = IndexerError; - fn try_from(token_account: &photon_api::models::TokenAccount) -> Result { - let account = CompressedAccount::try_from(token_account.account.as_ref())?; + fn try_from(token_account: &photon_api::types::TokenAccount) -> Result { + let account = CompressedAccount::try_from(&token_account.account)?; let token = parse_token_data(&token_account.token_data)?; Ok(CompressedTokenAccount { token, account }) } } -impl TryFrom<&photon_api::models::TokenAccountV2> for CompressedTokenAccount { +impl TryFrom<&photon_api::types::TokenAccountV2> for CompressedTokenAccount { type Error = IndexerError; - fn try_from(token_account: &photon_api::models::TokenAccountV2) -> Result { - let account = CompressedAccount::try_from(token_account.account.as_ref())?; + fn try_from(token_account: &photon_api::types::TokenAccountV2) -> Result { + let account = CompressedAccount::try_from(&token_account.account)?; let token = parse_token_data(&token_account.token_data)?; Ok(CompressedTokenAccount { token, account }) } @@ -119,12 +119,12 @@ pub struct TokenBalance { pub mint: Pubkey, } -impl TryFrom<&photon_api::models::TokenBalance> for TokenBalance { +impl TryFrom<&photon_api::types::TokenBalance> for TokenBalance { type Error = IndexerError; - fn try_from(token_balance: &photon_api::models::TokenBalance) -> Result { + fn try_from(token_balance: &photon_api::types::TokenBalance) -> Result { Ok(TokenBalance { - balance: token_balance.balance, + balance: *token_balance.balance, mint: Pubkey::new_from_array(decode_base58_to_fixed_array(&token_balance.mint)?), }) } @@ -136,12 +136,12 @@ pub struct OwnerBalance { pub owner: Pubkey, } -impl TryFrom<&photon_api::models::OwnerBalance> for OwnerBalance { +impl TryFrom<&photon_api::types::OwnerBalance> for OwnerBalance { type Error = IndexerError; - fn try_from(owner_balance: &photon_api::models::OwnerBalance) -> Result { + fn try_from(owner_balance: &photon_api::types::OwnerBalance) -> Result { Ok(OwnerBalance { - balance: owner_balance.balance, + balance: *owner_balance.balance, owner: Pubkey::new_from_array(decode_base58_to_fixed_array(&owner_balance.owner)?), }) } diff --git a/sdk-libs/client/src/indexer/types/tree.rs b/sdk-libs/client/src/indexer/types/tree.rs index 100efee9cd..b0bf815394 100644 --- a/sdk-libs/client/src/indexer/types/tree.rs +++ b/sdk-libs/client/src/indexer/types/tree.rs @@ -32,16 +32,16 @@ impl NextTreeInfo { } } pub fn from_api_model( - value: &photon_api::models::TreeContextInfo, + value: &photon_api::types::TreeContextInfo, ) -> Result { Self::try_from(value) } } -impl TryFrom<&photon_api::models::TreeContextInfo> for NextTreeInfo { +impl TryFrom<&photon_api::types::TreeContextInfo> for NextTreeInfo { type Error = IndexerError; - fn try_from(value: &photon_api::models::TreeContextInfo) -> Result { + fn try_from(value: &photon_api::types::TreeContextInfo) -> Result { Ok(Self { tree_type: TreeType::from(value.tree_type as u64), tree: Pubkey::new_from_array(decode_base58_to_fixed_array(&value.tree)?), @@ -86,7 +86,7 @@ impl TreeInfo { } pub fn from_api_model( - value: &photon_api::models::MerkleContextV2, + value: &photon_api::types::MerkleContextV2, ) -> Result { Ok(Self { tree_type: TreeType::from(value.tree_type as u64), @@ -96,7 +96,7 @@ impl TreeInfo { next_tree_info: value .next_tree_context .as_ref() - .map(|tree_info| NextTreeInfo::from_api_model(tree_info.as_ref())) + .map(NextTreeInfo::from_api_model) .transpose()?, }) } diff --git a/sdk-libs/client/src/lib.rs b/sdk-libs/client/src/lib.rs index d20e964c12..3e2ccd7fbe 100644 --- a/sdk-libs/client/src/lib.rs +++ b/sdk-libs/client/src/lib.rs @@ -50,9 +50,11 @@ //! // Connect to the validator //! let mut rpc = LightClient::new(LightClientConfig::local()).await?; //! -//! // Or connect to devnet/mainnet: -//! // let mut rpc = LightClient::new(LightClientConfig::new("https://devnet.helius-rpc.com/?api-key=YOUR_KEY")).await?; -//! // let mut rpc = LightClient::new(LightClientConfig::new("https://mainnet.helius-rpc.com/?api-key=YOUR_KEY")).await?; +//! // Or connect to devnet/mainnet (API key embedded in photon URL): +//! // let mut rpc = LightClient::new(LightClientConfig::new( +//! // "https://devnet.helius-rpc.com".to_string(), +//! // Some("https://photon.helius.com?api-key=YOUR_KEY".to_string()), +//! // )).await?; //! //! let owner = Pubkey::new_unique(); //! diff --git a/sdk-libs/client/src/rpc/client.rs b/sdk-libs/client/src/rpc/client.rs index 5fd58211d8..59da769957 100644 --- a/sdk-libs/client/src/rpc/client.rs +++ b/sdk-libs/client/src/rpc/client.rs @@ -153,9 +153,7 @@ impl LightClient { let client = RpcClient::new_with_commitment(config.url.to_string(), commitment_config); let retry_config = retry_config.unwrap_or_default(); - let indexer = config - .photon_url - .map(|path| PhotonIndexer::new(path, config.api_key)); + let indexer = config.photon_url.map(PhotonIndexer::new); let mut new = Self { client, @@ -170,8 +168,8 @@ impl LightClient { Ok(new) } - pub fn add_indexer(&mut self, path: String, api_key: Option) { - self.indexer = Some(PhotonIndexer::new(path, api_key)); + pub fn add_indexer(&mut self, url: String) { + self.indexer = Some(PhotonIndexer::new(url)); } /// Detects the network type based on the RPC URL. V1 only. diff --git a/sdk-libs/client/src/rpc/rpc_trait.rs b/sdk-libs/client/src/rpc/rpc_trait.rs index 820bc455d3..0c3d61caa8 100644 --- a/sdk-libs/client/src/rpc/rpc_trait.rs +++ b/sdk-libs/client/src/rpc/rpc_trait.rs @@ -27,17 +27,17 @@ use crate::{ pub struct LightClientConfig { pub url: String, pub commitment_config: Option, + /// Photon indexer URL. To pass an API key, include it in the URL: + /// `https://photon.helius.com?api-key=YOUR_KEY` pub photon_url: Option, - pub api_key: Option, pub fetch_active_tree: bool, } impl LightClientConfig { - pub fn new(url: String, photon_url: Option, api_key: Option) -> Self { + pub fn new(url: String, photon_url: Option) -> Self { Self { url, photon_url, - api_key, commitment_config: Some(CommitmentConfig::confirmed()), fetch_active_tree: true, } @@ -47,7 +47,6 @@ impl LightClientConfig { url: RpcUrl::Localnet.to_string(), commitment_config: Some(CommitmentConfig::confirmed()), photon_url: None, - api_key: None, fetch_active_tree: false, } } @@ -57,16 +56,14 @@ impl LightClientConfig { url: RpcUrl::Localnet.to_string(), commitment_config: Some(CommitmentConfig::processed()), photon_url: Some("http://127.0.0.1:8784".to_string()), - api_key: None, fetch_active_tree: false, } } - pub fn devnet(photon_url: Option, api_key: Option) -> Self { + pub fn devnet(photon_url: Option) -> Self { Self { url: RpcUrl::Devnet.to_string(), photon_url, - api_key, commitment_config: Some(CommitmentConfig::confirmed()), fetch_active_tree: true, } diff --git a/sdk-libs/photon-api/.gitignore b/sdk-libs/photon-api/.gitignore deleted file mode 100644 index 6aa106405a..0000000000 --- a/sdk-libs/photon-api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target/ -**/*.rs.bk -Cargo.lock diff --git a/sdk-libs/photon-api/.openapi-generator-ignore b/sdk-libs/photon-api/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/sdk-libs/photon-api/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/sdk-libs/photon-api/.openapi-generator/FILES b/sdk-libs/photon-api/.openapi-generator/FILES deleted file mode 100644 index 39236a3b1f..0000000000 --- a/sdk-libs/photon-api/.openapi-generator/FILES +++ /dev/null @@ -1,336 +0,0 @@ -.gitignore -.openapi-generator-ignore -.travis.yml -Cargo.toml -README.md -docs/Account.md -docs/AccountContext.md -docs/AccountData.md -docs/AccountList.md -docs/AccountListV2.md -docs/AccountProofInputs.md -docs/AccountState.md -docs/AccountV2.md -docs/AccountWithContext.md -docs/AccountWithOptionalTokenData.md -docs/AccountWithOptionalTokenDataV2.md -docs/AddressProofInputs.md -docs/AddressQueueIndex.md -docs/AddressWithTree.md -docs/ClosedAccountV2.md -docs/ClosedAccountWithOptionalTokenDataV2.md -docs/CompressedProof.md -docs/CompressedProofWithContext.md -docs/CompressedProofWithContextV2.md -docs/CompressionInfoV2.md -docs/Context.md -docs/DataSlice.md -docs/DefaultApi.md -docs/FilterSelector.md -docs/GetBatchAddressUpdateInfoPost200Response.md -docs/GetBatchAddressUpdateInfoPost200ResponseError.md -docs/GetBatchAddressUpdateInfoPost200ResponseResult.md -docs/GetBatchAddressUpdateInfoPost429Response.md -docs/GetBatchAddressUpdateInfoPostRequest.md -docs/GetBatchAddressUpdateInfoPostRequestParams.md -docs/GetCompressedAccountBalancePost200Response.md -docs/GetCompressedAccountBalancePost200ResponseResult.md -docs/GetCompressedAccountBalancePostRequest.md -docs/GetCompressedAccountPost200Response.md -docs/GetCompressedAccountPost200ResponseResult.md -docs/GetCompressedAccountPostRequest.md -docs/GetCompressedAccountPostRequestParams.md -docs/GetCompressedAccountProofPost200Response.md -docs/GetCompressedAccountProofPost200ResponseResult.md -docs/GetCompressedAccountProofPostRequest.md -docs/GetCompressedAccountProofPostRequestParams.md -docs/GetCompressedAccountProofResponseValue.md -docs/GetCompressedAccountProofResponseValueV2.md -docs/GetCompressedAccountProofV2Post200Response.md -docs/GetCompressedAccountProofV2Post200ResponseResult.md -docs/GetCompressedAccountProofV2PostRequest.md -docs/GetCompressedAccountV2Post200Response.md -docs/GetCompressedAccountV2Post200ResponseResult.md -docs/GetCompressedAccountV2PostRequest.md -docs/GetCompressedAccountsByOwnerPost200Response.md -docs/GetCompressedAccountsByOwnerPost200ResponseResult.md -docs/GetCompressedAccountsByOwnerPostRequest.md -docs/GetCompressedAccountsByOwnerPostRequestParams.md -docs/GetCompressedAccountsByOwnerV2Post200Response.md -docs/GetCompressedAccountsByOwnerV2Post200ResponseResult.md -docs/GetCompressedAccountsByOwnerV2PostRequest.md -docs/GetCompressedBalanceByOwnerPostRequest.md -docs/GetCompressedBalanceByOwnerPostRequestParams.md -docs/GetCompressedMintTokenHoldersPost200Response.md -docs/GetCompressedMintTokenHoldersPost200ResponseResult.md -docs/GetCompressedMintTokenHoldersPostRequest.md -docs/GetCompressedMintTokenHoldersPostRequestParams.md -docs/GetCompressedTokenAccountBalancePost200Response.md -docs/GetCompressedTokenAccountBalancePost200ResponseResult.md -docs/GetCompressedTokenAccountBalancePostRequest.md -docs/GetCompressedTokenAccountsByDelegatePost200Response.md -docs/GetCompressedTokenAccountsByDelegatePost200ResponseResult.md -docs/GetCompressedTokenAccountsByDelegatePostRequest.md -docs/GetCompressedTokenAccountsByDelegatePostRequestParams.md -docs/GetCompressedTokenAccountsByDelegateV2Post200Response.md -docs/GetCompressedTokenAccountsByDelegateV2Post200ResponseResult.md -docs/GetCompressedTokenAccountsByDelegateV2PostRequest.md -docs/GetCompressedTokenAccountsByOwnerPostRequest.md -docs/GetCompressedTokenAccountsByOwnerPostRequestParams.md -docs/GetCompressedTokenAccountsByOwnerV2PostRequest.md -docs/GetCompressedTokenBalancesByOwnerPost200Response.md -docs/GetCompressedTokenBalancesByOwnerPost200ResponseResult.md -docs/GetCompressedTokenBalancesByOwnerPostRequest.md -docs/GetCompressedTokenBalancesByOwnerV2Post200Response.md -docs/GetCompressedTokenBalancesByOwnerV2Post200ResponseResult.md -docs/GetCompressedTokenBalancesByOwnerV2PostRequest.md -docs/GetCompressionSignaturesForAccountPost200Response.md -docs/GetCompressionSignaturesForAccountPost200ResponseResult.md -docs/GetCompressionSignaturesForAccountPostRequest.md -docs/GetCompressionSignaturesForAddressPost200Response.md -docs/GetCompressionSignaturesForAddressPost200ResponseResult.md -docs/GetCompressionSignaturesForAddressPostRequest.md -docs/GetCompressionSignaturesForAddressPostRequestParams.md -docs/GetCompressionSignaturesForOwnerPostRequest.md -docs/GetCompressionSignaturesForOwnerPostRequestParams.md -docs/GetCompressionSignaturesForTokenOwnerPostRequest.md -docs/GetIndexerHealthPost200Response.md -docs/GetIndexerHealthPostRequest.md -docs/GetIndexerSlotPost200Response.md -docs/GetIndexerSlotPostRequest.md -docs/GetLatestCompressionSignaturesPostRequest.md -docs/GetLatestCompressionSignaturesPostRequestParams.md -docs/GetLatestNonVotingSignaturesPost200Response.md -docs/GetLatestNonVotingSignaturesPost200ResponseResult.md -docs/GetLatestNonVotingSignaturesPostRequest.md -docs/GetMultipleCompressedAccountProofsPost200Response.md -docs/GetMultipleCompressedAccountProofsPost200ResponseResult.md -docs/GetMultipleCompressedAccountProofsPostRequest.md -docs/GetMultipleCompressedAccountProofsV2Post200Response.md -docs/GetMultipleCompressedAccountProofsV2Post200ResponseResult.md -docs/GetMultipleCompressedAccountProofsV2PostRequest.md -docs/GetMultipleCompressedAccountsPost200Response.md -docs/GetMultipleCompressedAccountsPost200ResponseResult.md -docs/GetMultipleCompressedAccountsPostRequest.md -docs/GetMultipleCompressedAccountsPostRequestParams.md -docs/GetMultipleCompressedAccountsV2Post200Response.md -docs/GetMultipleCompressedAccountsV2Post200ResponseResult.md -docs/GetMultipleCompressedAccountsV2PostRequest.md -docs/GetMultipleCompressedAccountsV2PostRequestParams.md -docs/GetMultipleNewAddressProofsPost200Response.md -docs/GetMultipleNewAddressProofsPost200ResponseResult.md -docs/GetMultipleNewAddressProofsPostRequest.md -docs/GetMultipleNewAddressProofsV2PostRequest.md -docs/GetQueueElementsPost200Response.md -docs/GetQueueElementsPost200ResponseResult.md -docs/GetQueueElementsPostRequest.md -docs/GetQueueElementsPostRequestParams.md -docs/GetQueueElementsResponseValue.md -docs/GetTransactionWithCompressionInfoPost200Response.md -docs/GetTransactionWithCompressionInfoPost200ResponseResult.md -docs/GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo.md -docs/GetTransactionWithCompressionInfoPostRequest.md -docs/GetTransactionWithCompressionInfoPostRequestParams.md -docs/GetTransactionWithCompressionInfoV2Post200Response.md -docs/GetTransactionWithCompressionInfoV2Post200ResponseResult.md -docs/GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo.md -docs/GetTransactionWithCompressionInfoV2PostRequest.md -docs/GetValidityProofPost200Response.md -docs/GetValidityProofPost200ResponseResult.md -docs/GetValidityProofPostRequest.md -docs/GetValidityProofPostRequestParams.md -docs/GetValidityProofV2Post200Response.md -docs/GetValidityProofV2Post200ResponseResult.md -docs/GetValidityProofV2PostRequest.md -docs/Memcmp.md -docs/MerkleContextV2.md -docs/MerkleContextWithNewAddressProof.md -docs/OwnerBalance.md -docs/OwnerBalanceList.md -docs/OwnerBalancesResponse.md -docs/PaginatedAccountList.md -docs/PaginatedAccountListV2.md -docs/PaginatedSignatureInfoList.md -docs/RootIndex.md -docs/SignatureInfo.md -docs/SignatureInfoList.md -docs/SignatureInfoListWithError.md -docs/SignatureInfoWithError.md -docs/TokenAccount.md -docs/TokenAccountBalance.md -docs/TokenAccountList.md -docs/TokenAccountListV2.md -docs/TokenAccountV2.md -docs/TokenBalance.md -docs/TokenBalanceList.md -docs/TokenBalanceListV2.md -docs/TokenData.md -docs/TreeContextInfo.md -git_push.sh -src/apis/configuration.rs -src/apis/default_api.rs -src/apis/mod.rs -src/lib.rs -src/models/_get_batch_address_update_info_post_200_response.rs -src/models/_get_batch_address_update_info_post_200_response_error.rs -src/models/_get_batch_address_update_info_post_200_response_result.rs -src/models/_get_batch_address_update_info_post_429_response.rs -src/models/_get_batch_address_update_info_post_request.rs -src/models/_get_batch_address_update_info_post_request_params.rs -src/models/_get_compressed_account_balance_post_200_response.rs -src/models/_get_compressed_account_balance_post_200_response_result.rs -src/models/_get_compressed_account_balance_post_request.rs -src/models/_get_compressed_account_post_200_response.rs -src/models/_get_compressed_account_post_200_response_result.rs -src/models/_get_compressed_account_post_request.rs -src/models/_get_compressed_account_post_request_params.rs -src/models/_get_compressed_account_proof_post_200_response.rs -src/models/_get_compressed_account_proof_post_200_response_result.rs -src/models/_get_compressed_account_proof_post_request.rs -src/models/_get_compressed_account_proof_post_request_params.rs -src/models/_get_compressed_account_proof_v2_post_200_response.rs -src/models/_get_compressed_account_proof_v2_post_200_response_result.rs -src/models/_get_compressed_account_proof_v2_post_request.rs -src/models/_get_compressed_account_v2_post_200_response.rs -src/models/_get_compressed_account_v2_post_200_response_result.rs -src/models/_get_compressed_account_v2_post_request.rs -src/models/_get_compressed_accounts_by_owner_post_200_response.rs -src/models/_get_compressed_accounts_by_owner_post_200_response_result.rs -src/models/_get_compressed_accounts_by_owner_post_request.rs -src/models/_get_compressed_accounts_by_owner_post_request_params.rs -src/models/_get_compressed_accounts_by_owner_v2_post_200_response.rs -src/models/_get_compressed_accounts_by_owner_v2_post_200_response_result.rs -src/models/_get_compressed_accounts_by_owner_v2_post_request.rs -src/models/_get_compressed_balance_by_owner_post_request.rs -src/models/_get_compressed_balance_by_owner_post_request_params.rs -src/models/_get_compressed_mint_token_holders_post_200_response.rs -src/models/_get_compressed_mint_token_holders_post_200_response_result.rs -src/models/_get_compressed_mint_token_holders_post_request.rs -src/models/_get_compressed_mint_token_holders_post_request_params.rs -src/models/_get_compressed_token_account_balance_post_200_response.rs -src/models/_get_compressed_token_account_balance_post_200_response_result.rs -src/models/_get_compressed_token_account_balance_post_request.rs -src/models/_get_compressed_token_accounts_by_delegate_post_200_response.rs -src/models/_get_compressed_token_accounts_by_delegate_post_200_response_result.rs -src/models/_get_compressed_token_accounts_by_delegate_post_request.rs -src/models/_get_compressed_token_accounts_by_delegate_post_request_params.rs -src/models/_get_compressed_token_accounts_by_delegate_v2_post_200_response.rs -src/models/_get_compressed_token_accounts_by_delegate_v2_post_200_response_result.rs -src/models/_get_compressed_token_accounts_by_delegate_v2_post_request.rs -src/models/_get_compressed_token_accounts_by_owner_post_request.rs -src/models/_get_compressed_token_accounts_by_owner_post_request_params.rs -src/models/_get_compressed_token_accounts_by_owner_v2_post_request.rs -src/models/_get_compressed_token_balances_by_owner_post_200_response.rs -src/models/_get_compressed_token_balances_by_owner_post_200_response_result.rs -src/models/_get_compressed_token_balances_by_owner_post_request.rs -src/models/_get_compressed_token_balances_by_owner_v2_post_200_response.rs -src/models/_get_compressed_token_balances_by_owner_v2_post_200_response_result.rs -src/models/_get_compressed_token_balances_by_owner_v2_post_request.rs -src/models/_get_compression_signatures_for_account_post_200_response.rs -src/models/_get_compression_signatures_for_account_post_200_response_result.rs -src/models/_get_compression_signatures_for_account_post_request.rs -src/models/_get_compression_signatures_for_address_post_200_response.rs -src/models/_get_compression_signatures_for_address_post_200_response_result.rs -src/models/_get_compression_signatures_for_address_post_request.rs -src/models/_get_compression_signatures_for_address_post_request_params.rs -src/models/_get_compression_signatures_for_owner_post_request.rs -src/models/_get_compression_signatures_for_owner_post_request_params.rs -src/models/_get_compression_signatures_for_token_owner_post_request.rs -src/models/_get_indexer_health_post_200_response.rs -src/models/_get_indexer_health_post_request.rs -src/models/_get_indexer_slot_post_200_response.rs -src/models/_get_indexer_slot_post_request.rs -src/models/_get_latest_compression_signatures_post_request.rs -src/models/_get_latest_compression_signatures_post_request_params.rs -src/models/_get_latest_non_voting_signatures_post_200_response.rs -src/models/_get_latest_non_voting_signatures_post_200_response_result.rs -src/models/_get_latest_non_voting_signatures_post_request.rs -src/models/_get_multiple_compressed_account_proofs_post_200_response.rs -src/models/_get_multiple_compressed_account_proofs_post_200_response_result.rs -src/models/_get_multiple_compressed_account_proofs_post_request.rs -src/models/_get_multiple_compressed_account_proofs_v2_post_200_response.rs -src/models/_get_multiple_compressed_account_proofs_v2_post_200_response_result.rs -src/models/_get_multiple_compressed_account_proofs_v2_post_request.rs -src/models/_get_multiple_compressed_accounts_post_200_response.rs -src/models/_get_multiple_compressed_accounts_post_200_response_result.rs -src/models/_get_multiple_compressed_accounts_post_request.rs -src/models/_get_multiple_compressed_accounts_post_request_params.rs -src/models/_get_multiple_compressed_accounts_v2_post_200_response.rs -src/models/_get_multiple_compressed_accounts_v2_post_200_response_result.rs -src/models/_get_multiple_compressed_accounts_v2_post_request.rs -src/models/_get_multiple_compressed_accounts_v2_post_request_params.rs -src/models/_get_multiple_new_address_proofs_post_200_response.rs -src/models/_get_multiple_new_address_proofs_post_200_response_result.rs -src/models/_get_multiple_new_address_proofs_post_request.rs -src/models/_get_multiple_new_address_proofs_v2_post_request.rs -src/models/_get_queue_elements_post_200_response.rs -src/models/_get_queue_elements_post_200_response_result.rs -src/models/_get_queue_elements_post_request.rs -src/models/_get_queue_elements_post_request_params.rs -src/models/_get_transaction_with_compression_info_post_200_response.rs -src/models/_get_transaction_with_compression_info_post_200_response_result.rs -src/models/_get_transaction_with_compression_info_post_200_response_result_compression_info.rs -src/models/_get_transaction_with_compression_info_post_request.rs -src/models/_get_transaction_with_compression_info_post_request_params.rs -src/models/_get_transaction_with_compression_info_v2_post_200_response.rs -src/models/_get_transaction_with_compression_info_v2_post_200_response_result.rs -src/models/_get_transaction_with_compression_info_v2_post_200_response_result_compression_info.rs -src/models/_get_transaction_with_compression_info_v2_post_request.rs -src/models/_get_validity_proof_post_200_response.rs -src/models/_get_validity_proof_post_200_response_result.rs -src/models/_get_validity_proof_post_request.rs -src/models/_get_validity_proof_post_request_params.rs -src/models/_get_validity_proof_v2_post_200_response.rs -src/models/_get_validity_proof_v2_post_200_response_result.rs -src/models/_get_validity_proof_v2_post_request.rs -src/models/account.rs -src/models/account_context.rs -src/models/account_data.rs -src/models/account_list.rs -src/models/account_list_v2.rs -src/models/account_proof_inputs.rs -src/models/account_state.rs -src/models/account_v2.rs -src/models/account_with_context.rs -src/models/account_with_optional_token_data.rs -src/models/account_with_optional_token_data_v2.rs -src/models/address_proof_inputs.rs -src/models/address_queue_index.rs -src/models/address_with_tree.rs -src/models/closed_account_v2.rs -src/models/closed_account_with_optional_token_data_v2.rs -src/models/compressed_proof.rs -src/models/compressed_proof_with_context.rs -src/models/compressed_proof_with_context_v2.rs -src/models/compression_info_v2.rs -src/models/context.rs -src/models/data_slice.rs -src/models/filter_selector.rs -src/models/get_compressed_account_proof_response_value.rs -src/models/get_compressed_account_proof_response_value_v2.rs -src/models/get_queue_elements_response_value.rs -src/models/memcmp.rs -src/models/merkle_context_v2.rs -src/models/merkle_context_with_new_address_proof.rs -src/models/mod.rs -src/models/owner_balance.rs -src/models/owner_balance_list.rs -src/models/owner_balances_response.rs -src/models/paginated_account_list.rs -src/models/paginated_account_list_v2.rs -src/models/paginated_signature_info_list.rs -src/models/root_index.rs -src/models/signature_info.rs -src/models/signature_info_list.rs -src/models/signature_info_list_with_error.rs -src/models/signature_info_with_error.rs -src/models/token_account.rs -src/models/token_account_balance.rs -src/models/token_account_list.rs -src/models/token_account_list_v2.rs -src/models/token_account_v2.rs -src/models/token_balance.rs -src/models/token_balance_list.rs -src/models/token_balance_list_v2.rs -src/models/token_data.rs -src/models/tree_context_info.rs diff --git a/sdk-libs/photon-api/.openapi-generator/VERSION b/sdk-libs/photon-api/.openapi-generator/VERSION deleted file mode 100644 index 18bb4182dd..0000000000 --- a/sdk-libs/photon-api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.5.0 diff --git a/sdk-libs/photon-api/.travis.yml b/sdk-libs/photon-api/.travis.yml deleted file mode 100644 index 22761ba7ee..0000000000 --- a/sdk-libs/photon-api/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: rust diff --git a/sdk-libs/photon-api/CHANGELOG.md b/sdk-libs/photon-api/CHANGELOG.md new file mode 100644 index 0000000000..891d6f18c6 --- /dev/null +++ b/sdk-libs/photon-api/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +## [Unreleased] + +### Breaking Changes + +- **Simplified `Configuration` struct.** The API key is now embedded in the URL as a query parameter: + ```rust + // Before + let mut config = Configuration::new(); + config.base_path = "https://photon.helius.com".to_string(); + config.api_key = Some(ApiKey { prefix: None, key: "YOUR_KEY".to_string() }); + + // After + let config = Configuration::new("https://photon.helius.com?api-key=YOUR_KEY".to_string()); + ``` + +- **Removed `Configuration::new_with_api_key`.** Use `Configuration::new` with the API key in the URL instead. + +### Added + +- **`external/photon` git submodule.** The Photon OpenAPI spec (`external/photon/src/openapi/specs/api.yaml`) is now pulled in as a submodule. Client types are pre-generated by [progenitor](https://github.com/oxidecomputer/progenitor) and checked in as `src/codegen.rs`. To regenerate after spec changes: `cargo build -p photon-api --features generate`. Generation deps (progenitor, regress, etc.) are behind the optional `generate` feature so they don't affect normal builds or CI. diff --git a/sdk-libs/photon-api/Cargo.toml b/sdk-libs/photon-api/Cargo.toml index 87841b3079..dbd83037d8 100644 --- a/sdk-libs/photon-api/Cargo.toml +++ b/sdk-libs/photon-api/Cargo.toml @@ -1,18 +1,34 @@ [package] name = "photon-api" version = "0.54.0" -authors = ["OpenAPI Generator team and contributors"] description = "Solana indexer for general compression" license = "Apache-2.0" -edition = "2018" +edition = "2021" + +[features] +# Regenerate types from the OpenAPI spec (external/photon). +# Usage: cargo build -p photon-api --features generate +generate = [ + "dep:progenitor", + "dep:openapiv3", + "dep:serde_yaml", + "dep:syn", + "dep:prettyplease", +] [dependencies] -serde = "^1.0" -serde_derive = "^1.0" -serde_with = "^3.12" -serde_json = "^1.0" -url = "^2.2" -uuid = { version = "^1.0", features = ["serde", "v4"] } -[dependencies.reqwest] -version = "^0.12" -features = ["json", "multipart"] +progenitor-client = "0.12" +reqwest = { version = "0.13", default-features = false, features = ["json", "stream", "rustls"] } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +[dev-dependencies] +tokio = { version = "1", features = ["macros", "rt-multi-thread"] } +wiremock = "0.6" + +[build-dependencies] +progenitor = { version = "0.12", optional = true } +openapiv3 = { version = "2.0", optional = true } +serde_yaml = { version = "0.9", optional = true } +syn = { version = "2.0", optional = true } +prettyplease = { version = "0.2", optional = true } diff --git a/sdk-libs/photon-api/README.md b/sdk-libs/photon-api/README.md deleted file mode 100644 index b3429f125a..0000000000 --- a/sdk-libs/photon-api/README.md +++ /dev/null @@ -1,242 +0,0 @@ -# Rust API client for photon-api - -Solana indexer for general compression - - -## Overview - -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - -- API version: 0.50.0 -- Package version: 0.50.0 -- Generator version: 7.5.0 -- Build package: `org.openapitools.codegen.languages.RustClientCodegen` - -## Installation - -Put the package under your project folder in a directory named `photon-api` and add the following to `Cargo.toml` under `[dependencies]`: - -``` -photon-api = { path = "./photon-api" } -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://devnet.helius-rpc.com?api-key=* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**get_batch_address_update_info_post**](docs/DefaultApi.md#get_batch_address_update_info_post) | **POST** /getBatchAddressUpdateInfo | -*DefaultApi* | [**get_compressed_account_balance_post**](docs/DefaultApi.md#get_compressed_account_balance_post) | **POST** /getCompressedAccountBalance | -*DefaultApi* | [**get_compressed_account_post**](docs/DefaultApi.md#get_compressed_account_post) | **POST** /getCompressedAccount | -*DefaultApi* | [**get_compressed_account_proof_post**](docs/DefaultApi.md#get_compressed_account_proof_post) | **POST** /getCompressedAccountProof | -*DefaultApi* | [**get_compressed_account_proof_v2_post**](docs/DefaultApi.md#get_compressed_account_proof_v2_post) | **POST** /getCompressedAccountProofV2 | -*DefaultApi* | [**get_compressed_account_v2_post**](docs/DefaultApi.md#get_compressed_account_v2_post) | **POST** /getCompressedAccountV2 | -*DefaultApi* | [**get_compressed_accounts_by_owner_post**](docs/DefaultApi.md#get_compressed_accounts_by_owner_post) | **POST** /getCompressedAccountsByOwner | -*DefaultApi* | [**get_compressed_accounts_by_owner_v2_post**](docs/DefaultApi.md#get_compressed_accounts_by_owner_v2_post) | **POST** /getCompressedAccountsByOwnerV2 | -*DefaultApi* | [**get_compressed_balance_by_owner_post**](docs/DefaultApi.md#get_compressed_balance_by_owner_post) | **POST** /getCompressedBalanceByOwner | -*DefaultApi* | [**get_compressed_mint_token_holders_post**](docs/DefaultApi.md#get_compressed_mint_token_holders_post) | **POST** /getCompressedMintTokenHolders | -*DefaultApi* | [**get_compressed_token_account_balance_post**](docs/DefaultApi.md#get_compressed_token_account_balance_post) | **POST** /getCompressedTokenAccountBalance | -*DefaultApi* | [**get_compressed_token_accounts_by_delegate_post**](docs/DefaultApi.md#get_compressed_token_accounts_by_delegate_post) | **POST** /getCompressedTokenAccountsByDelegate | -*DefaultApi* | [**get_compressed_token_accounts_by_delegate_v2_post**](docs/DefaultApi.md#get_compressed_token_accounts_by_delegate_v2_post) | **POST** /getCompressedTokenAccountsByDelegateV2 | -*DefaultApi* | [**get_compressed_token_accounts_by_owner_post**](docs/DefaultApi.md#get_compressed_token_accounts_by_owner_post) | **POST** /getCompressedTokenAccountsByOwner | -*DefaultApi* | [**get_compressed_token_accounts_by_owner_v2_post**](docs/DefaultApi.md#get_compressed_token_accounts_by_owner_v2_post) | **POST** /getCompressedTokenAccountsByOwnerV2 | -*DefaultApi* | [**get_compressed_token_balances_by_owner_post**](docs/DefaultApi.md#get_compressed_token_balances_by_owner_post) | **POST** /getCompressedTokenBalancesByOwner | -*DefaultApi* | [**get_compressed_token_balances_by_owner_v2_post**](docs/DefaultApi.md#get_compressed_token_balances_by_owner_v2_post) | **POST** /getCompressedTokenBalancesByOwnerV2 | -*DefaultApi* | [**get_compression_signatures_for_account_post**](docs/DefaultApi.md#get_compression_signatures_for_account_post) | **POST** /getCompressionSignaturesForAccount | -*DefaultApi* | [**get_compression_signatures_for_address_post**](docs/DefaultApi.md#get_compression_signatures_for_address_post) | **POST** /getCompressionSignaturesForAddress | -*DefaultApi* | [**get_compression_signatures_for_owner_post**](docs/DefaultApi.md#get_compression_signatures_for_owner_post) | **POST** /getCompressionSignaturesForOwner | -*DefaultApi* | [**get_compression_signatures_for_token_owner_post**](docs/DefaultApi.md#get_compression_signatures_for_token_owner_post) | **POST** /getCompressionSignaturesForTokenOwner | -*DefaultApi* | [**get_indexer_health_post**](docs/DefaultApi.md#get_indexer_health_post) | **POST** /getIndexerHealth | -*DefaultApi* | [**get_indexer_slot_post**](docs/DefaultApi.md#get_indexer_slot_post) | **POST** /getIndexerSlot | -*DefaultApi* | [**get_latest_compression_signatures_post**](docs/DefaultApi.md#get_latest_compression_signatures_post) | **POST** /getLatestCompressionSignatures | -*DefaultApi* | [**get_latest_non_voting_signatures_post**](docs/DefaultApi.md#get_latest_non_voting_signatures_post) | **POST** /getLatestNonVotingSignatures | -*DefaultApi* | [**get_multiple_compressed_account_proofs_post**](docs/DefaultApi.md#get_multiple_compressed_account_proofs_post) | **POST** /getMultipleCompressedAccountProofs | -*DefaultApi* | [**get_multiple_compressed_account_proofs_v2_post**](docs/DefaultApi.md#get_multiple_compressed_account_proofs_v2_post) | **POST** /getMultipleCompressedAccountProofsV2 | -*DefaultApi* | [**get_multiple_compressed_accounts_post**](docs/DefaultApi.md#get_multiple_compressed_accounts_post) | **POST** /getMultipleCompressedAccounts | -*DefaultApi* | [**get_multiple_compressed_accounts_v2_post**](docs/DefaultApi.md#get_multiple_compressed_accounts_v2_post) | **POST** /getMultipleCompressedAccountsV2 | -*DefaultApi* | [**get_multiple_new_address_proofs_post**](docs/DefaultApi.md#get_multiple_new_address_proofs_post) | **POST** /getMultipleNewAddressProofs | -*DefaultApi* | [**get_multiple_new_address_proofs_v2_post**](docs/DefaultApi.md#get_multiple_new_address_proofs_v2_post) | **POST** /getMultipleNewAddressProofsV2 | -*DefaultApi* | [**get_queue_elements_post**](docs/DefaultApi.md#get_queue_elements_post) | **POST** /getQueueElements | -*DefaultApi* | [**get_transaction_with_compression_info_post**](docs/DefaultApi.md#get_transaction_with_compression_info_post) | **POST** /getTransactionWithCompressionInfo | -*DefaultApi* | [**get_transaction_with_compression_info_v2_post**](docs/DefaultApi.md#get_transaction_with_compression_info_v2_post) | **POST** /getTransactionWithCompressionInfoV2 | -*DefaultApi* | [**get_validity_proof_post**](docs/DefaultApi.md#get_validity_proof_post) | **POST** /getValidityProof | -*DefaultApi* | [**get_validity_proof_v2_post**](docs/DefaultApi.md#get_validity_proof_v2_post) | **POST** /getValidityProofV2 | - - -## Documentation For Models - - - [Account](docs/Account.md) - - [AccountContext](docs/AccountContext.md) - - [AccountData](docs/AccountData.md) - - [AccountList](docs/AccountList.md) - - [AccountListV2](docs/AccountListV2.md) - - [AccountProofInputs](docs/AccountProofInputs.md) - - [AccountState](docs/AccountState.md) - - [AccountV2](docs/AccountV2.md) - - [AccountWithContext](docs/AccountWithContext.md) - - [AccountWithOptionalTokenData](docs/AccountWithOptionalTokenData.md) - - [AccountWithOptionalTokenDataV2](docs/AccountWithOptionalTokenDataV2.md) - - [AddressProofInputs](docs/AddressProofInputs.md) - - [AddressQueueIndex](docs/AddressQueueIndex.md) - - [AddressWithTree](docs/AddressWithTree.md) - - [ClosedAccountV2](docs/ClosedAccountV2.md) - - [ClosedAccountWithOptionalTokenDataV2](docs/ClosedAccountWithOptionalTokenDataV2.md) - - [CompressedProof](docs/CompressedProof.md) - - [CompressedProofWithContext](docs/CompressedProofWithContext.md) - - [CompressedProofWithContextV2](docs/CompressedProofWithContextV2.md) - - [CompressionInfoV2](docs/CompressionInfoV2.md) - - [Context](docs/Context.md) - - [DataSlice](docs/DataSlice.md) - - [FilterSelector](docs/FilterSelector.md) - - [GetBatchAddressUpdateInfoPost200Response](docs/GetBatchAddressUpdateInfoPost200Response.md) - - [GetBatchAddressUpdateInfoPost200ResponseError](docs/GetBatchAddressUpdateInfoPost200ResponseError.md) - - [GetBatchAddressUpdateInfoPost200ResponseResult](docs/GetBatchAddressUpdateInfoPost200ResponseResult.md) - - [GetBatchAddressUpdateInfoPost429Response](docs/GetBatchAddressUpdateInfoPost429Response.md) - - [GetBatchAddressUpdateInfoPostRequest](docs/GetBatchAddressUpdateInfoPostRequest.md) - - [GetBatchAddressUpdateInfoPostRequestParams](docs/GetBatchAddressUpdateInfoPostRequestParams.md) - - [GetCompressedAccountBalancePost200Response](docs/GetCompressedAccountBalancePost200Response.md) - - [GetCompressedAccountBalancePost200ResponseResult](docs/GetCompressedAccountBalancePost200ResponseResult.md) - - [GetCompressedAccountBalancePostRequest](docs/GetCompressedAccountBalancePostRequest.md) - - [GetCompressedAccountPost200Response](docs/GetCompressedAccountPost200Response.md) - - [GetCompressedAccountPost200ResponseResult](docs/GetCompressedAccountPost200ResponseResult.md) - - [GetCompressedAccountPostRequest](docs/GetCompressedAccountPostRequest.md) - - [GetCompressedAccountPostRequestParams](docs/GetCompressedAccountPostRequestParams.md) - - [GetCompressedAccountProofPost200Response](docs/GetCompressedAccountProofPost200Response.md) - - [GetCompressedAccountProofPost200ResponseResult](docs/GetCompressedAccountProofPost200ResponseResult.md) - - [GetCompressedAccountProofPostRequest](docs/GetCompressedAccountProofPostRequest.md) - - [GetCompressedAccountProofPostRequestParams](docs/GetCompressedAccountProofPostRequestParams.md) - - [GetCompressedAccountProofResponseValue](docs/GetCompressedAccountProofResponseValue.md) - - [GetCompressedAccountProofResponseValueV2](docs/GetCompressedAccountProofResponseValueV2.md) - - [GetCompressedAccountProofV2Post200Response](docs/GetCompressedAccountProofV2Post200Response.md) - - [GetCompressedAccountProofV2Post200ResponseResult](docs/GetCompressedAccountProofV2Post200ResponseResult.md) - - [GetCompressedAccountProofV2PostRequest](docs/GetCompressedAccountProofV2PostRequest.md) - - [GetCompressedAccountV2Post200Response](docs/GetCompressedAccountV2Post200Response.md) - - [GetCompressedAccountV2Post200ResponseResult](docs/GetCompressedAccountV2Post200ResponseResult.md) - - [GetCompressedAccountV2PostRequest](docs/GetCompressedAccountV2PostRequest.md) - - [GetCompressedAccountsByOwnerPost200Response](docs/GetCompressedAccountsByOwnerPost200Response.md) - - [GetCompressedAccountsByOwnerPost200ResponseResult](docs/GetCompressedAccountsByOwnerPost200ResponseResult.md) - - [GetCompressedAccountsByOwnerPostRequest](docs/GetCompressedAccountsByOwnerPostRequest.md) - - [GetCompressedAccountsByOwnerPostRequestParams](docs/GetCompressedAccountsByOwnerPostRequestParams.md) - - [GetCompressedAccountsByOwnerV2Post200Response](docs/GetCompressedAccountsByOwnerV2Post200Response.md) - - [GetCompressedAccountsByOwnerV2Post200ResponseResult](docs/GetCompressedAccountsByOwnerV2Post200ResponseResult.md) - - [GetCompressedAccountsByOwnerV2PostRequest](docs/GetCompressedAccountsByOwnerV2PostRequest.md) - - [GetCompressedBalanceByOwnerPostRequest](docs/GetCompressedBalanceByOwnerPostRequest.md) - - [GetCompressedBalanceByOwnerPostRequestParams](docs/GetCompressedBalanceByOwnerPostRequestParams.md) - - [GetCompressedMintTokenHoldersPost200Response](docs/GetCompressedMintTokenHoldersPost200Response.md) - - [GetCompressedMintTokenHoldersPost200ResponseResult](docs/GetCompressedMintTokenHoldersPost200ResponseResult.md) - - [GetCompressedMintTokenHoldersPostRequest](docs/GetCompressedMintTokenHoldersPostRequest.md) - - [GetCompressedMintTokenHoldersPostRequestParams](docs/GetCompressedMintTokenHoldersPostRequestParams.md) - - [GetCompressedTokenAccountBalancePost200Response](docs/GetCompressedTokenAccountBalancePost200Response.md) - - [GetCompressedTokenAccountBalancePost200ResponseResult](docs/GetCompressedTokenAccountBalancePost200ResponseResult.md) - - [GetCompressedTokenAccountBalancePostRequest](docs/GetCompressedTokenAccountBalancePostRequest.md) - - [GetCompressedTokenAccountsByDelegatePost200Response](docs/GetCompressedTokenAccountsByDelegatePost200Response.md) - - [GetCompressedTokenAccountsByDelegatePost200ResponseResult](docs/GetCompressedTokenAccountsByDelegatePost200ResponseResult.md) - - [GetCompressedTokenAccountsByDelegatePostRequest](docs/GetCompressedTokenAccountsByDelegatePostRequest.md) - - [GetCompressedTokenAccountsByDelegatePostRequestParams](docs/GetCompressedTokenAccountsByDelegatePostRequestParams.md) - - [GetCompressedTokenAccountsByDelegateV2Post200Response](docs/GetCompressedTokenAccountsByDelegateV2Post200Response.md) - - [GetCompressedTokenAccountsByDelegateV2Post200ResponseResult](docs/GetCompressedTokenAccountsByDelegateV2Post200ResponseResult.md) - - [GetCompressedTokenAccountsByDelegateV2PostRequest](docs/GetCompressedTokenAccountsByDelegateV2PostRequest.md) - - [GetCompressedTokenAccountsByOwnerPostRequest](docs/GetCompressedTokenAccountsByOwnerPostRequest.md) - - [GetCompressedTokenAccountsByOwnerPostRequestParams](docs/GetCompressedTokenAccountsByOwnerPostRequestParams.md) - - [GetCompressedTokenAccountsByOwnerV2PostRequest](docs/GetCompressedTokenAccountsByOwnerV2PostRequest.md) - - [GetCompressedTokenBalancesByOwnerPost200Response](docs/GetCompressedTokenBalancesByOwnerPost200Response.md) - - [GetCompressedTokenBalancesByOwnerPost200ResponseResult](docs/GetCompressedTokenBalancesByOwnerPost200ResponseResult.md) - - [GetCompressedTokenBalancesByOwnerPostRequest](docs/GetCompressedTokenBalancesByOwnerPostRequest.md) - - [GetCompressedTokenBalancesByOwnerV2Post200Response](docs/GetCompressedTokenBalancesByOwnerV2Post200Response.md) - - [GetCompressedTokenBalancesByOwnerV2Post200ResponseResult](docs/GetCompressedTokenBalancesByOwnerV2Post200ResponseResult.md) - - [GetCompressedTokenBalancesByOwnerV2PostRequest](docs/GetCompressedTokenBalancesByOwnerV2PostRequest.md) - - [GetCompressionSignaturesForAccountPost200Response](docs/GetCompressionSignaturesForAccountPost200Response.md) - - [GetCompressionSignaturesForAccountPost200ResponseResult](docs/GetCompressionSignaturesForAccountPost200ResponseResult.md) - - [GetCompressionSignaturesForAccountPostRequest](docs/GetCompressionSignaturesForAccountPostRequest.md) - - [GetCompressionSignaturesForAddressPost200Response](docs/GetCompressionSignaturesForAddressPost200Response.md) - - [GetCompressionSignaturesForAddressPost200ResponseResult](docs/GetCompressionSignaturesForAddressPost200ResponseResult.md) - - [GetCompressionSignaturesForAddressPostRequest](docs/GetCompressionSignaturesForAddressPostRequest.md) - - [GetCompressionSignaturesForAddressPostRequestParams](docs/GetCompressionSignaturesForAddressPostRequestParams.md) - - [GetCompressionSignaturesForOwnerPostRequest](docs/GetCompressionSignaturesForOwnerPostRequest.md) - - [GetCompressionSignaturesForOwnerPostRequestParams](docs/GetCompressionSignaturesForOwnerPostRequestParams.md) - - [GetCompressionSignaturesForTokenOwnerPostRequest](docs/GetCompressionSignaturesForTokenOwnerPostRequest.md) - - [GetIndexerHealthPost200Response](docs/GetIndexerHealthPost200Response.md) - - [GetIndexerHealthPostRequest](docs/GetIndexerHealthPostRequest.md) - - [GetIndexerSlotPost200Response](docs/GetIndexerSlotPost200Response.md) - - [GetIndexerSlotPostRequest](docs/GetIndexerSlotPostRequest.md) - - [GetLatestCompressionSignaturesPostRequest](docs/GetLatestCompressionSignaturesPostRequest.md) - - [GetLatestCompressionSignaturesPostRequestParams](docs/GetLatestCompressionSignaturesPostRequestParams.md) - - [GetLatestNonVotingSignaturesPost200Response](docs/GetLatestNonVotingSignaturesPost200Response.md) - - [GetLatestNonVotingSignaturesPost200ResponseResult](docs/GetLatestNonVotingSignaturesPost200ResponseResult.md) - - [GetLatestNonVotingSignaturesPostRequest](docs/GetLatestNonVotingSignaturesPostRequest.md) - - [GetMultipleCompressedAccountProofsPost200Response](docs/GetMultipleCompressedAccountProofsPost200Response.md) - - [GetMultipleCompressedAccountProofsPost200ResponseResult](docs/GetMultipleCompressedAccountProofsPost200ResponseResult.md) - - [GetMultipleCompressedAccountProofsPostRequest](docs/GetMultipleCompressedAccountProofsPostRequest.md) - - [GetMultipleCompressedAccountProofsV2Post200Response](docs/GetMultipleCompressedAccountProofsV2Post200Response.md) - - [GetMultipleCompressedAccountProofsV2Post200ResponseResult](docs/GetMultipleCompressedAccountProofsV2Post200ResponseResult.md) - - [GetMultipleCompressedAccountProofsV2PostRequest](docs/GetMultipleCompressedAccountProofsV2PostRequest.md) - - [GetMultipleCompressedAccountsPost200Response](docs/GetMultipleCompressedAccountsPost200Response.md) - - [GetMultipleCompressedAccountsPost200ResponseResult](docs/GetMultipleCompressedAccountsPost200ResponseResult.md) - - [GetMultipleCompressedAccountsPostRequest](docs/GetMultipleCompressedAccountsPostRequest.md) - - [GetMultipleCompressedAccountsPostRequestParams](docs/GetMultipleCompressedAccountsPostRequestParams.md) - - [GetMultipleCompressedAccountsV2Post200Response](docs/GetMultipleCompressedAccountsV2Post200Response.md) - - [GetMultipleCompressedAccountsV2Post200ResponseResult](docs/GetMultipleCompressedAccountsV2Post200ResponseResult.md) - - [GetMultipleCompressedAccountsV2PostRequest](docs/GetMultipleCompressedAccountsV2PostRequest.md) - - [GetMultipleCompressedAccountsV2PostRequestParams](docs/GetMultipleCompressedAccountsV2PostRequestParams.md) - - [GetMultipleNewAddressProofsPost200Response](docs/GetMultipleNewAddressProofsPost200Response.md) - - [GetMultipleNewAddressProofsPost200ResponseResult](docs/GetMultipleNewAddressProofsPost200ResponseResult.md) - - [GetMultipleNewAddressProofsPostRequest](docs/GetMultipleNewAddressProofsPostRequest.md) - - [GetMultipleNewAddressProofsV2PostRequest](docs/GetMultipleNewAddressProofsV2PostRequest.md) - - [GetQueueElementsPost200Response](docs/GetQueueElementsPost200Response.md) - - [GetQueueElementsPost200ResponseResult](docs/GetQueueElementsPost200ResponseResult.md) - - [GetQueueElementsPostRequest](docs/GetQueueElementsPostRequest.md) - - [GetQueueElementsPostRequestParams](docs/GetQueueElementsPostRequestParams.md) - - [GetQueueElementsResponseValue](docs/GetQueueElementsResponseValue.md) - - [GetTransactionWithCompressionInfoPost200Response](docs/GetTransactionWithCompressionInfoPost200Response.md) - - [GetTransactionWithCompressionInfoPost200ResponseResult](docs/GetTransactionWithCompressionInfoPost200ResponseResult.md) - - [GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo](docs/GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo.md) - - [GetTransactionWithCompressionInfoPostRequest](docs/GetTransactionWithCompressionInfoPostRequest.md) - - [GetTransactionWithCompressionInfoPostRequestParams](docs/GetTransactionWithCompressionInfoPostRequestParams.md) - - [GetTransactionWithCompressionInfoV2Post200Response](docs/GetTransactionWithCompressionInfoV2Post200Response.md) - - [GetTransactionWithCompressionInfoV2Post200ResponseResult](docs/GetTransactionWithCompressionInfoV2Post200ResponseResult.md) - - [GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo](docs/GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo.md) - - [GetTransactionWithCompressionInfoV2PostRequest](docs/GetTransactionWithCompressionInfoV2PostRequest.md) - - [GetValidityProofPost200Response](docs/GetValidityProofPost200Response.md) - - [GetValidityProofPost200ResponseResult](docs/GetValidityProofPost200ResponseResult.md) - - [GetValidityProofPostRequest](docs/GetValidityProofPostRequest.md) - - [GetValidityProofPostRequestParams](docs/GetValidityProofPostRequestParams.md) - - [GetValidityProofV2Post200Response](docs/GetValidityProofV2Post200Response.md) - - [GetValidityProofV2Post200ResponseResult](docs/GetValidityProofV2Post200ResponseResult.md) - - [GetValidityProofV2PostRequest](docs/GetValidityProofV2PostRequest.md) - - [Memcmp](docs/Memcmp.md) - - [MerkleContextV2](docs/MerkleContextV2.md) - - [MerkleContextWithNewAddressProof](docs/MerkleContextWithNewAddressProof.md) - - [OwnerBalance](docs/OwnerBalance.md) - - [OwnerBalanceList](docs/OwnerBalanceList.md) - - [OwnerBalancesResponse](docs/OwnerBalancesResponse.md) - - [PaginatedAccountList](docs/PaginatedAccountList.md) - - [PaginatedAccountListV2](docs/PaginatedAccountListV2.md) - - [PaginatedSignatureInfoList](docs/PaginatedSignatureInfoList.md) - - [RootIndex](docs/RootIndex.md) - - [SignatureInfo](docs/SignatureInfo.md) - - [SignatureInfoList](docs/SignatureInfoList.md) - - [SignatureInfoListWithError](docs/SignatureInfoListWithError.md) - - [SignatureInfoWithError](docs/SignatureInfoWithError.md) - - [TokenAccount](docs/TokenAccount.md) - - [TokenAccountBalance](docs/TokenAccountBalance.md) - - [TokenAccountList](docs/TokenAccountList.md) - - [TokenAccountListV2](docs/TokenAccountListV2.md) - - [TokenAccountV2](docs/TokenAccountV2.md) - - [TokenBalance](docs/TokenBalance.md) - - [TokenBalanceList](docs/TokenBalanceList.md) - - [TokenBalanceListV2](docs/TokenBalanceListV2.md) - - [TokenData](docs/TokenData.md) - - [TreeContextInfo](docs/TreeContextInfo.md) - - -To get access to the crate's generated documentation, use: - -``` -cargo doc --open -``` - -## Author - - - diff --git a/sdk-libs/photon-api/build.rs b/sdk-libs/photon-api/build.rs new file mode 100644 index 0000000000..2948343130 --- /dev/null +++ b/sdk-libs/photon-api/build.rs @@ -0,0 +1,92 @@ +fn main() { + #[cfg(feature = "generate")] + generate(); +} + +#[cfg(feature = "generate")] +fn generate() { + use std::{env, fs, path::PathBuf}; + + let manifest_dir = + PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set")); + let spec_path = manifest_dir.join("../../external/photon/src/openapi/specs/api.yaml"); + + println!("cargo::rerun-if-changed={}", spec_path.display()); + + // Read and parse the OpenAPI spec + let spec_content = fs::read_to_string(&spec_path).expect("Failed to read OpenAPI spec"); + + let mut spec: serde_yaml::Value = + serde_yaml::from_str(&spec_content).expect("Failed to parse OpenAPI spec"); + + // Add operationIds to each path's operation + if let Some(paths) = spec.get_mut("paths").and_then(|p| p.as_mapping_mut()) { + for (path, methods) in paths.iter_mut() { + let path_str = path.as_str().unwrap_or(""); + let base_id = path_str.trim_start_matches('/'); + + if let Some(methods_map) = methods.as_mapping_mut() { + for (method, operation) in methods_map.iter_mut() { + if method.as_str() == Some("summary") { + continue; + } + + if let Some(op_map) = operation.as_mapping_mut() { + let method_str = method.as_str().unwrap_or("get"); + let operation_id = format!("{}_{}", method_str, to_snake_case(base_id)); + + op_map.insert( + serde_yaml::Value::String("operationId".to_string()), + serde_yaml::Value::String(operation_id), + ); + } + } + } + } + } + + let modified_spec = serde_yaml::to_string(&spec).expect("Failed to serialize modified spec"); + + // Parse for progenitor + let spec: openapiv3::OpenAPI = + serde_yaml::from_str(&modified_spec).expect("Failed to parse modified spec as OpenAPI"); + + let mut settings = progenitor::GenerationSettings::default(); + settings.with_interface(progenitor::InterfaceStyle::Builder); + + let mut generator = progenitor::Generator::new(&settings); + let tokens = generator + .generate_tokens(&spec) + .expect("Failed to generate client code"); + + // Format the generated code + let ast: syn::File = syn::parse2(tokens).expect("Failed to parse generated code"); + let content = prettyplease::unparse(&ast); + + // Write to src/codegen.rs (checked-in file) + let dest_path = manifest_dir.join("src/codegen.rs"); + fs::write(&dest_path, &content).expect("Failed to write generated code"); + + eprintln!("photon-api: regenerated src/codegen.rs from OpenAPI spec"); +} + +#[cfg(feature = "generate")] +fn to_snake_case(s: &str) -> String { + let mut result = String::new(); + let mut prev_is_lower = false; + + for c in s.chars() { + if c.is_uppercase() { + if prev_is_lower { + result.push('_'); + } + result.extend(c.to_lowercase()); + prev_is_lower = false; + } else { + result.push(c); + prev_is_lower = c.is_lowercase(); + } + } + + result +} diff --git a/sdk-libs/photon-api/docs/Account.md b/sdk-libs/photon-api/docs/Account.md deleted file mode 100644 index 124dfa7154..0000000000 --- a/sdk-libs/photon-api/docs/Account.md +++ /dev/null @@ -1,19 +0,0 @@ -# Account - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | Option<**String**> | A Solana public key represented as a base58 string. | [optional][default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**data** | Option<[**models::AccountData**](AccountData.md)> | | [optional] -**hash** | **String** | A 32-byte hash represented as a base58 string. | -**lamports** | **i32** | | [default to 100] -**leaf_index** | **i32** | | [default to 100] -**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**seq** | Option<**i32**> | | [optional][default to 100] -**slot_created** | **i32** | | [default to 100] -**tree** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountContext.md b/sdk-libs/photon-api/docs/AccountContext.md deleted file mode 100644 index 4b53bca423..0000000000 --- a/sdk-libs/photon-api/docs/AccountContext.md +++ /dev/null @@ -1,18 +0,0 @@ -# AccountContext - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**in_output_queue** | **bool** | | -**nullified_in_tree** | **bool** | | -**nullifier** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional] -**nullifier_queue_index** | Option<**i32**> | | [optional][default to 100] -**queue** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**spent** | **bool** | | -**tree_type** | **i32** | | -**tx_hash** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountData.md b/sdk-libs/photon-api/docs/AccountData.md deleted file mode 100644 index 627206a84b..0000000000 --- a/sdk-libs/photon-api/docs/AccountData.md +++ /dev/null @@ -1,13 +0,0 @@ -# AccountData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | **String** | A base 64 encoded string. | [default to SGVsbG8sIFdvcmxkIQ==] -**data_hash** | **String** | A 32-byte hash represented as a base58 string. | -**discriminator** | **i32** | | [default to 100] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountList.md b/sdk-libs/photon-api/docs/AccountList.md deleted file mode 100644 index d109bb869f..0000000000 --- a/sdk-libs/photon-api/docs/AccountList.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**Vec**](Account.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountListV2.md b/sdk-libs/photon-api/docs/AccountListV2.md deleted file mode 100644 index 623d84668c..0000000000 --- a/sdk-libs/photon-api/docs/AccountListV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountListV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**Vec**](AccountV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountProofInputs.md b/sdk-libs/photon-api/docs/AccountProofInputs.md deleted file mode 100644 index 4ae39e4246..0000000000 --- a/sdk-libs/photon-api/docs/AccountProofInputs.md +++ /dev/null @@ -1,15 +0,0 @@ -# AccountProofInputs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hash** | **String** | | -**leaf_index** | **i32** | | -**merkle_context** | [**models::MerkleContextV2**](MerkleContextV2.md) | | -**root** | **String** | | -**root_index** | [**models::RootIndex**](RootIndex.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountState.md b/sdk-libs/photon-api/docs/AccountState.md deleted file mode 100644 index d678e865ef..0000000000 --- a/sdk-libs/photon-api/docs/AccountState.md +++ /dev/null @@ -1,13 +0,0 @@ -# AccountState - -## Enum Variants - -| Name | Value | -|---- | -----| -| Initialized | initialized | -| Frozen | frozen | - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountV2.md b/sdk-libs/photon-api/docs/AccountV2.md deleted file mode 100644 index 1168d41d48..0000000000 --- a/sdk-libs/photon-api/docs/AccountV2.md +++ /dev/null @@ -1,20 +0,0 @@ -# AccountV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | Option<**String**> | A Solana public key represented as a base58 string. | [optional][default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**data** | Option<[**models::AccountData**](AccountData.md)> | | [optional] -**hash** | **String** | A 32-byte hash represented as a base58 string. | -**lamports** | **i32** | | [default to 100] -**leaf_index** | **i32** | | [default to 100] -**merkle_context** | [**models::MerkleContextV2**](MerkleContextV2.md) | | -**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**prove_by_index** | **bool** | | -**seq** | Option<**i32**> | | [optional][default to 100] -**slot_created** | **i32** | | [default to 100] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountWithContext.md b/sdk-libs/photon-api/docs/AccountWithContext.md deleted file mode 100644 index 0880718a72..0000000000 --- a/sdk-libs/photon-api/docs/AccountWithContext.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountWithContext - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [**models::Account**](Account.md) | | -**context** | [**models::AccountContext**](AccountContext.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountWithOptionalTokenData.md b/sdk-libs/photon-api/docs/AccountWithOptionalTokenData.md deleted file mode 100644 index 15b462030b..0000000000 --- a/sdk-libs/photon-api/docs/AccountWithOptionalTokenData.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountWithOptionalTokenData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [**models::Account**](Account.md) | | -**optional_token_data** | Option<[**models::TokenData**](TokenData.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AccountWithOptionalTokenDataV2.md b/sdk-libs/photon-api/docs/AccountWithOptionalTokenDataV2.md deleted file mode 100644 index 928e39800c..0000000000 --- a/sdk-libs/photon-api/docs/AccountWithOptionalTokenDataV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountWithOptionalTokenDataV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [**models::AccountV2**](AccountV2.md) | | -**optional_token_data** | Option<[**models::TokenData**](TokenData.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AddressProofInputs.md b/sdk-libs/photon-api/docs/AddressProofInputs.md deleted file mode 100644 index e6a51ba7f9..0000000000 --- a/sdk-libs/photon-api/docs/AddressProofInputs.md +++ /dev/null @@ -1,14 +0,0 @@ -# AddressProofInputs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | **String** | | -**merkle_context** | [**models::MerkleContextV2**](MerkleContextV2.md) | | -**root** | **String** | | -**root_index** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AddressQueueIndex.md b/sdk-libs/photon-api/docs/AddressQueueIndex.md deleted file mode 100644 index 350585af16..0000000000 --- a/sdk-libs/photon-api/docs/AddressQueueIndex.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddressQueueIndex - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**queue_index** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/AddressWithTree.md b/sdk-libs/photon-api/docs/AddressWithTree.md deleted file mode 100644 index 0b309016ff..0000000000 --- a/sdk-libs/photon-api/docs/AddressWithTree.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddressWithTree - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**tree** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/ClosedAccountV2.md b/sdk-libs/photon-api/docs/ClosedAccountV2.md deleted file mode 100644 index cd30e9869d..0000000000 --- a/sdk-libs/photon-api/docs/ClosedAccountV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# ClosedAccountV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [**models::AccountV2**](AccountV2.md) | | -**nullifier** | **String** | A 32-byte hash represented as a base58 string. | -**tx_hash** | **String** | A 32-byte hash represented as a base58 string. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/ClosedAccountWithOptionalTokenDataV2.md b/sdk-libs/photon-api/docs/ClosedAccountWithOptionalTokenDataV2.md deleted file mode 100644 index 29fda6dc52..0000000000 --- a/sdk-libs/photon-api/docs/ClosedAccountWithOptionalTokenDataV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# ClosedAccountWithOptionalTokenDataV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [**models::ClosedAccountV2**](ClosedAccountV2.md) | | -**optional_token_data** | Option<[**models::TokenData**](TokenData.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/CompressedProof.md b/sdk-libs/photon-api/docs/CompressedProof.md deleted file mode 100644 index a5c5a1c810..0000000000 --- a/sdk-libs/photon-api/docs/CompressedProof.md +++ /dev/null @@ -1,13 +0,0 @@ -# CompressedProof - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**a** | [**std::path::PathBuf**](std::path::PathBuf.md) | | -**b** | [**std::path::PathBuf**](std::path::PathBuf.md) | | -**c** | [**std::path::PathBuf**](std::path::PathBuf.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/CompressedProofWithContext.md b/sdk-libs/photon-api/docs/CompressedProofWithContext.md deleted file mode 100644 index f04b7f77d5..0000000000 --- a/sdk-libs/photon-api/docs/CompressedProofWithContext.md +++ /dev/null @@ -1,16 +0,0 @@ -# CompressedProofWithContext - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**compressed_proof** | [**models::CompressedProof**](CompressedProof.md) | | -**leaf_indices** | **Vec** | | -**leaves** | **Vec** | | -**merkle_trees** | **Vec** | | -**root_indices** | **Vec** | | -**roots** | **Vec** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/CompressedProofWithContextV2.md b/sdk-libs/photon-api/docs/CompressedProofWithContextV2.md deleted file mode 100644 index 67ffde9cce..0000000000 --- a/sdk-libs/photon-api/docs/CompressedProofWithContextV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# CompressedProofWithContextV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accounts** | [**Vec**](AccountProofInputs.md) | | -**addresses** | [**Vec**](AddressProofInputs.md) | | -**compressed_proof** | Option<[**models::CompressedProof**](CompressedProof.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/CompressionInfoV2.md b/sdk-libs/photon-api/docs/CompressionInfoV2.md deleted file mode 100644 index 26fe77d09a..0000000000 --- a/sdk-libs/photon-api/docs/CompressionInfoV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# CompressionInfoV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**closed_accounts** | [**Vec**](ClosedAccountWithOptionalTokenDataV2.md) | | -**opened_accounts** | [**Vec**](AccountWithOptionalTokenDataV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/Context.md b/sdk-libs/photon-api/docs/Context.md deleted file mode 100644 index cba933ca87..0000000000 --- a/sdk-libs/photon-api/docs/Context.md +++ /dev/null @@ -1,11 +0,0 @@ -# Context - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**slot** | **i32** | | [default to 100] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/DataSlice.md b/sdk-libs/photon-api/docs/DataSlice.md deleted file mode 100644 index 143e06f303..0000000000 --- a/sdk-libs/photon-api/docs/DataSlice.md +++ /dev/null @@ -1,12 +0,0 @@ -# DataSlice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**length** | **u32** | | -**offset** | **u32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/DefaultApi.md b/sdk-libs/photon-api/docs/DefaultApi.md deleted file mode 100644 index b42a3a6cb8..0000000000 --- a/sdk-libs/photon-api/docs/DefaultApi.md +++ /dev/null @@ -1,1052 +0,0 @@ -# \DefaultApi - -All URIs are relative to *https://devnet.helius-rpc.com?api-key=* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_batch_address_update_info_post**](DefaultApi.md#get_batch_address_update_info_post) | **POST** /getBatchAddressUpdateInfo | -[**get_compressed_account_balance_post**](DefaultApi.md#get_compressed_account_balance_post) | **POST** /getCompressedAccountBalance | -[**get_compressed_account_post**](DefaultApi.md#get_compressed_account_post) | **POST** /getCompressedAccount | -[**get_compressed_account_proof_post**](DefaultApi.md#get_compressed_account_proof_post) | **POST** /getCompressedAccountProof | -[**get_compressed_account_proof_v2_post**](DefaultApi.md#get_compressed_account_proof_v2_post) | **POST** /getCompressedAccountProofV2 | -[**get_compressed_account_v2_post**](DefaultApi.md#get_compressed_account_v2_post) | **POST** /getCompressedAccountV2 | -[**get_compressed_accounts_by_owner_post**](DefaultApi.md#get_compressed_accounts_by_owner_post) | **POST** /getCompressedAccountsByOwner | -[**get_compressed_accounts_by_owner_v2_post**](DefaultApi.md#get_compressed_accounts_by_owner_v2_post) | **POST** /getCompressedAccountsByOwnerV2 | -[**get_compressed_balance_by_owner_post**](DefaultApi.md#get_compressed_balance_by_owner_post) | **POST** /getCompressedBalanceByOwner | -[**get_compressed_mint_token_holders_post**](DefaultApi.md#get_compressed_mint_token_holders_post) | **POST** /getCompressedMintTokenHolders | -[**get_compressed_token_account_balance_post**](DefaultApi.md#get_compressed_token_account_balance_post) | **POST** /getCompressedTokenAccountBalance | -[**get_compressed_token_accounts_by_delegate_post**](DefaultApi.md#get_compressed_token_accounts_by_delegate_post) | **POST** /getCompressedTokenAccountsByDelegate | -[**get_compressed_token_accounts_by_delegate_v2_post**](DefaultApi.md#get_compressed_token_accounts_by_delegate_v2_post) | **POST** /getCompressedTokenAccountsByDelegateV2 | -[**get_compressed_token_accounts_by_owner_post**](DefaultApi.md#get_compressed_token_accounts_by_owner_post) | **POST** /getCompressedTokenAccountsByOwner | -[**get_compressed_token_accounts_by_owner_v2_post**](DefaultApi.md#get_compressed_token_accounts_by_owner_v2_post) | **POST** /getCompressedTokenAccountsByOwnerV2 | -[**get_compressed_token_balances_by_owner_post**](DefaultApi.md#get_compressed_token_balances_by_owner_post) | **POST** /getCompressedTokenBalancesByOwner | -[**get_compressed_token_balances_by_owner_v2_post**](DefaultApi.md#get_compressed_token_balances_by_owner_v2_post) | **POST** /getCompressedTokenBalancesByOwnerV2 | -[**get_compression_signatures_for_account_post**](DefaultApi.md#get_compression_signatures_for_account_post) | **POST** /getCompressionSignaturesForAccount | -[**get_compression_signatures_for_address_post**](DefaultApi.md#get_compression_signatures_for_address_post) | **POST** /getCompressionSignaturesForAddress | -[**get_compression_signatures_for_owner_post**](DefaultApi.md#get_compression_signatures_for_owner_post) | **POST** /getCompressionSignaturesForOwner | -[**get_compression_signatures_for_token_owner_post**](DefaultApi.md#get_compression_signatures_for_token_owner_post) | **POST** /getCompressionSignaturesForTokenOwner | -[**get_indexer_health_post**](DefaultApi.md#get_indexer_health_post) | **POST** /getIndexerHealth | -[**get_indexer_slot_post**](DefaultApi.md#get_indexer_slot_post) | **POST** /getIndexerSlot | -[**get_latest_compression_signatures_post**](DefaultApi.md#get_latest_compression_signatures_post) | **POST** /getLatestCompressionSignatures | -[**get_latest_non_voting_signatures_post**](DefaultApi.md#get_latest_non_voting_signatures_post) | **POST** /getLatestNonVotingSignatures | -[**get_multiple_compressed_account_proofs_post**](DefaultApi.md#get_multiple_compressed_account_proofs_post) | **POST** /getMultipleCompressedAccountProofs | -[**get_multiple_compressed_account_proofs_v2_post**](DefaultApi.md#get_multiple_compressed_account_proofs_v2_post) | **POST** /getMultipleCompressedAccountProofsV2 | -[**get_multiple_compressed_accounts_post**](DefaultApi.md#get_multiple_compressed_accounts_post) | **POST** /getMultipleCompressedAccounts | -[**get_multiple_compressed_accounts_v2_post**](DefaultApi.md#get_multiple_compressed_accounts_v2_post) | **POST** /getMultipleCompressedAccountsV2 | -[**get_multiple_new_address_proofs_post**](DefaultApi.md#get_multiple_new_address_proofs_post) | **POST** /getMultipleNewAddressProofs | -[**get_multiple_new_address_proofs_v2_post**](DefaultApi.md#get_multiple_new_address_proofs_v2_post) | **POST** /getMultipleNewAddressProofsV2 | -[**get_queue_elements_post**](DefaultApi.md#get_queue_elements_post) | **POST** /getQueueElements | -[**get_transaction_with_compression_info_post**](DefaultApi.md#get_transaction_with_compression_info_post) | **POST** /getTransactionWithCompressionInfo | -[**get_transaction_with_compression_info_v2_post**](DefaultApi.md#get_transaction_with_compression_info_v2_post) | **POST** /getTransactionWithCompressionInfoV2 | -[**get_validity_proof_post**](DefaultApi.md#get_validity_proof_post) | **POST** /getValidityProof | -[**get_validity_proof_v2_post**](DefaultApi.md#get_validity_proof_v2_post) | **POST** /getValidityProofV2 | - - - -## get_batch_address_update_info_post - -> models::GetBatchAddressUpdateInfoPost200Response get_batch_address_update_info_post(get_batch_address_update_info_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_batch_address_update_info_post_request** | [**GetBatchAddressUpdateInfoPostRequest**](GetBatchAddressUpdateInfoPostRequest.md) | | [required] | - -### Return type - -[**models::GetBatchAddressUpdateInfoPost200Response**](_getBatchAddressUpdateInfo_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_account_balance_post - -> models::GetCompressedAccountBalancePost200Response get_compressed_account_balance_post(get_compressed_account_balance_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_account_balance_post_request** | [**GetCompressedAccountBalancePostRequest**](GetCompressedAccountBalancePostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedAccountBalancePost200Response**](_getCompressedAccountBalance_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_account_post - -> models::GetCompressedAccountPost200Response get_compressed_account_post(get_compressed_account_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_account_post_request** | [**GetCompressedAccountPostRequest**](GetCompressedAccountPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedAccountPost200Response**](_getCompressedAccount_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_account_proof_post - -> models::GetCompressedAccountProofPost200Response get_compressed_account_proof_post(get_compressed_account_proof_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_account_proof_post_request** | [**GetCompressedAccountProofPostRequest**](GetCompressedAccountProofPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedAccountProofPost200Response**](_getCompressedAccountProof_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_account_proof_v2_post - -> models::GetCompressedAccountProofV2Post200Response get_compressed_account_proof_v2_post(get_compressed_account_proof_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_account_proof_v2_post_request** | [**GetCompressedAccountProofV2PostRequest**](GetCompressedAccountProofV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedAccountProofV2Post200Response**](_getCompressedAccountProofV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_account_v2_post - -> models::GetCompressedAccountV2Post200Response get_compressed_account_v2_post(get_compressed_account_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_account_v2_post_request** | [**GetCompressedAccountV2PostRequest**](GetCompressedAccountV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedAccountV2Post200Response**](_getCompressedAccountV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_accounts_by_owner_post - -> models::GetCompressedAccountsByOwnerPost200Response get_compressed_accounts_by_owner_post(get_compressed_accounts_by_owner_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_accounts_by_owner_post_request** | [**GetCompressedAccountsByOwnerPostRequest**](GetCompressedAccountsByOwnerPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedAccountsByOwnerPost200Response**](_getCompressedAccountsByOwner_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_accounts_by_owner_v2_post - -> models::GetCompressedAccountsByOwnerV2Post200Response get_compressed_accounts_by_owner_v2_post(get_compressed_accounts_by_owner_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_accounts_by_owner_v2_post_request** | [**GetCompressedAccountsByOwnerV2PostRequest**](GetCompressedAccountsByOwnerV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedAccountsByOwnerV2Post200Response**](_getCompressedAccountsByOwnerV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_balance_by_owner_post - -> models::GetCompressedAccountBalancePost200Response get_compressed_balance_by_owner_post(get_compressed_balance_by_owner_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_balance_by_owner_post_request** | [**GetCompressedBalanceByOwnerPostRequest**](GetCompressedBalanceByOwnerPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedAccountBalancePost200Response**](_getCompressedAccountBalance_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_mint_token_holders_post - -> models::GetCompressedMintTokenHoldersPost200Response get_compressed_mint_token_holders_post(get_compressed_mint_token_holders_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_mint_token_holders_post_request** | [**GetCompressedMintTokenHoldersPostRequest**](GetCompressedMintTokenHoldersPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedMintTokenHoldersPost200Response**](_getCompressedMintTokenHolders_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_token_account_balance_post - -> models::GetCompressedTokenAccountBalancePost200Response get_compressed_token_account_balance_post(get_compressed_token_account_balance_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_token_account_balance_post_request** | [**GetCompressedTokenAccountBalancePostRequest**](GetCompressedTokenAccountBalancePostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedTokenAccountBalancePost200Response**](_getCompressedTokenAccountBalance_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_token_accounts_by_delegate_post - -> models::GetCompressedTokenAccountsByDelegatePost200Response get_compressed_token_accounts_by_delegate_post(get_compressed_token_accounts_by_delegate_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_token_accounts_by_delegate_post_request** | [**GetCompressedTokenAccountsByDelegatePostRequest**](GetCompressedTokenAccountsByDelegatePostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedTokenAccountsByDelegatePost200Response**](_getCompressedTokenAccountsByDelegate_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_token_accounts_by_delegate_v2_post - -> models::GetCompressedTokenAccountsByDelegateV2Post200Response get_compressed_token_accounts_by_delegate_v2_post(get_compressed_token_accounts_by_delegate_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_token_accounts_by_delegate_v2_post_request** | [**GetCompressedTokenAccountsByDelegateV2PostRequest**](GetCompressedTokenAccountsByDelegateV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedTokenAccountsByDelegateV2Post200Response**](_getCompressedTokenAccountsByDelegateV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_token_accounts_by_owner_post - -> models::GetCompressedTokenAccountsByDelegatePost200Response get_compressed_token_accounts_by_owner_post(get_compressed_token_accounts_by_owner_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_token_accounts_by_owner_post_request** | [**GetCompressedTokenAccountsByOwnerPostRequest**](GetCompressedTokenAccountsByOwnerPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedTokenAccountsByDelegatePost200Response**](_getCompressedTokenAccountsByDelegate_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_token_accounts_by_owner_v2_post - -> models::GetCompressedTokenAccountsByDelegateV2Post200Response get_compressed_token_accounts_by_owner_v2_post(get_compressed_token_accounts_by_owner_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_token_accounts_by_owner_v2_post_request** | [**GetCompressedTokenAccountsByOwnerV2PostRequest**](GetCompressedTokenAccountsByOwnerV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedTokenAccountsByDelegateV2Post200Response**](_getCompressedTokenAccountsByDelegateV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_token_balances_by_owner_post - -> models::GetCompressedTokenBalancesByOwnerPost200Response get_compressed_token_balances_by_owner_post(get_compressed_token_balances_by_owner_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_token_balances_by_owner_post_request** | [**GetCompressedTokenBalancesByOwnerPostRequest**](GetCompressedTokenBalancesByOwnerPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedTokenBalancesByOwnerPost200Response**](_getCompressedTokenBalancesByOwner_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compressed_token_balances_by_owner_v2_post - -> models::GetCompressedTokenBalancesByOwnerV2Post200Response get_compressed_token_balances_by_owner_v2_post(get_compressed_token_balances_by_owner_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compressed_token_balances_by_owner_v2_post_request** | [**GetCompressedTokenBalancesByOwnerV2PostRequest**](GetCompressedTokenBalancesByOwnerV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressedTokenBalancesByOwnerV2Post200Response**](_getCompressedTokenBalancesByOwnerV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compression_signatures_for_account_post - -> models::GetCompressionSignaturesForAccountPost200Response get_compression_signatures_for_account_post(get_compression_signatures_for_account_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compression_signatures_for_account_post_request** | [**GetCompressionSignaturesForAccountPostRequest**](GetCompressionSignaturesForAccountPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressionSignaturesForAccountPost200Response**](_getCompressionSignaturesForAccount_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compression_signatures_for_address_post - -> models::GetCompressionSignaturesForAddressPost200Response get_compression_signatures_for_address_post(get_compression_signatures_for_address_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compression_signatures_for_address_post_request** | [**GetCompressionSignaturesForAddressPostRequest**](GetCompressionSignaturesForAddressPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressionSignaturesForAddressPost200Response**](_getCompressionSignaturesForAddress_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compression_signatures_for_owner_post - -> models::GetCompressionSignaturesForAddressPost200Response get_compression_signatures_for_owner_post(get_compression_signatures_for_owner_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compression_signatures_for_owner_post_request** | [**GetCompressionSignaturesForOwnerPostRequest**](GetCompressionSignaturesForOwnerPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressionSignaturesForAddressPost200Response**](_getCompressionSignaturesForAddress_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_compression_signatures_for_token_owner_post - -> models::GetCompressionSignaturesForAddressPost200Response get_compression_signatures_for_token_owner_post(get_compression_signatures_for_token_owner_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_compression_signatures_for_token_owner_post_request** | [**GetCompressionSignaturesForTokenOwnerPostRequest**](GetCompressionSignaturesForTokenOwnerPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressionSignaturesForAddressPost200Response**](_getCompressionSignaturesForAddress_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_indexer_health_post - -> models::GetIndexerHealthPost200Response get_indexer_health_post(get_indexer_health_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_indexer_health_post_request** | [**GetIndexerHealthPostRequest**](GetIndexerHealthPostRequest.md) | | [required] | - -### Return type - -[**models::GetIndexerHealthPost200Response**](_getIndexerHealth_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_indexer_slot_post - -> models::GetIndexerSlotPost200Response get_indexer_slot_post(get_indexer_slot_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_indexer_slot_post_request** | [**GetIndexerSlotPostRequest**](GetIndexerSlotPostRequest.md) | | [required] | - -### Return type - -[**models::GetIndexerSlotPost200Response**](_getIndexerSlot_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_latest_compression_signatures_post - -> models::GetCompressionSignaturesForAddressPost200Response get_latest_compression_signatures_post(get_latest_compression_signatures_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_latest_compression_signatures_post_request** | [**GetLatestCompressionSignaturesPostRequest**](GetLatestCompressionSignaturesPostRequest.md) | | [required] | - -### Return type - -[**models::GetCompressionSignaturesForAddressPost200Response**](_getCompressionSignaturesForAddress_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_latest_non_voting_signatures_post - -> models::GetLatestNonVotingSignaturesPost200Response get_latest_non_voting_signatures_post(get_latest_non_voting_signatures_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_latest_non_voting_signatures_post_request** | [**GetLatestNonVotingSignaturesPostRequest**](GetLatestNonVotingSignaturesPostRequest.md) | | [required] | - -### Return type - -[**models::GetLatestNonVotingSignaturesPost200Response**](_getLatestNonVotingSignatures_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_multiple_compressed_account_proofs_post - -> models::GetMultipleCompressedAccountProofsPost200Response get_multiple_compressed_account_proofs_post(get_multiple_compressed_account_proofs_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_multiple_compressed_account_proofs_post_request** | [**GetMultipleCompressedAccountProofsPostRequest**](GetMultipleCompressedAccountProofsPostRequest.md) | | [required] | - -### Return type - -[**models::GetMultipleCompressedAccountProofsPost200Response**](_getMultipleCompressedAccountProofs_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_multiple_compressed_account_proofs_v2_post - -> models::GetMultipleCompressedAccountProofsV2Post200Response get_multiple_compressed_account_proofs_v2_post(get_multiple_compressed_account_proofs_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_multiple_compressed_account_proofs_v2_post_request** | [**GetMultipleCompressedAccountProofsV2PostRequest**](GetMultipleCompressedAccountProofsV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetMultipleCompressedAccountProofsV2Post200Response**](_getMultipleCompressedAccountProofsV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_multiple_compressed_accounts_post - -> models::GetMultipleCompressedAccountsPost200Response get_multiple_compressed_accounts_post(get_multiple_compressed_accounts_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_multiple_compressed_accounts_post_request** | [**GetMultipleCompressedAccountsPostRequest**](GetMultipleCompressedAccountsPostRequest.md) | | [required] | - -### Return type - -[**models::GetMultipleCompressedAccountsPost200Response**](_getMultipleCompressedAccounts_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_multiple_compressed_accounts_v2_post - -> models::GetMultipleCompressedAccountsV2Post200Response get_multiple_compressed_accounts_v2_post(get_multiple_compressed_accounts_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_multiple_compressed_accounts_v2_post_request** | [**GetMultipleCompressedAccountsV2PostRequest**](GetMultipleCompressedAccountsV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetMultipleCompressedAccountsV2Post200Response**](_getMultipleCompressedAccountsV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_multiple_new_address_proofs_post - -> models::GetMultipleNewAddressProofsPost200Response get_multiple_new_address_proofs_post(get_multiple_new_address_proofs_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_multiple_new_address_proofs_post_request** | [**GetMultipleNewAddressProofsPostRequest**](GetMultipleNewAddressProofsPostRequest.md) | | [required] | - -### Return type - -[**models::GetMultipleNewAddressProofsPost200Response**](_getMultipleNewAddressProofs_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_multiple_new_address_proofs_v2_post - -> models::GetMultipleNewAddressProofsPost200Response get_multiple_new_address_proofs_v2_post(get_multiple_new_address_proofs_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_multiple_new_address_proofs_v2_post_request** | [**GetMultipleNewAddressProofsV2PostRequest**](GetMultipleNewAddressProofsV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetMultipleNewAddressProofsPost200Response**](_getMultipleNewAddressProofs_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_queue_elements_post - -> models::GetQueueElementsPost200Response get_queue_elements_post(get_queue_elements_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_queue_elements_post_request** | [**GetQueueElementsPostRequest**](GetQueueElementsPostRequest.md) | | [required] | - -### Return type - -[**models::GetQueueElementsPost200Response**](_getQueueElements_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_transaction_with_compression_info_post - -> models::GetTransactionWithCompressionInfoPost200Response get_transaction_with_compression_info_post(get_transaction_with_compression_info_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_transaction_with_compression_info_post_request** | [**GetTransactionWithCompressionInfoPostRequest**](GetTransactionWithCompressionInfoPostRequest.md) | | [required] | - -### Return type - -[**models::GetTransactionWithCompressionInfoPost200Response**](_getTransactionWithCompressionInfo_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_transaction_with_compression_info_v2_post - -> models::GetTransactionWithCompressionInfoV2Post200Response get_transaction_with_compression_info_v2_post(get_transaction_with_compression_info_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_transaction_with_compression_info_v2_post_request** | [**GetTransactionWithCompressionInfoV2PostRequest**](GetTransactionWithCompressionInfoV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetTransactionWithCompressionInfoV2Post200Response**](_getTransactionWithCompressionInfoV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_validity_proof_post - -> models::GetValidityProofPost200Response get_validity_proof_post(get_validity_proof_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_validity_proof_post_request** | [**GetValidityProofPostRequest**](GetValidityProofPostRequest.md) | | [required] | - -### Return type - -[**models::GetValidityProofPost200Response**](_getValidityProof_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_validity_proof_v2_post - -> models::GetValidityProofV2Post200Response get_validity_proof_v2_post(get_validity_proof_v2_post_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**get_validity_proof_v2_post_request** | [**GetValidityProofV2PostRequest**](GetValidityProofV2PostRequest.md) | | [required] | - -### Return type - -[**models::GetValidityProofV2Post200Response**](_getValidityProofV2_post_200_response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk-libs/photon-api/docs/FilterSelector.md b/sdk-libs/photon-api/docs/FilterSelector.md deleted file mode 100644 index a49a120e72..0000000000 --- a/sdk-libs/photon-api/docs/FilterSelector.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterSelector - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**memcmp** | Option<[**models::Memcmp**](Memcmp.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200Response.md b/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200Response.md deleted file mode 100644 index f945ee463f..0000000000 --- a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetBatchAddressUpdateInfoPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseResult**](_getBatchAddressUpdateInfo_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200ResponseError.md b/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200ResponseError.md deleted file mode 100644 index 8600240a6f..0000000000 --- a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200ResponseError.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetBatchAddressUpdateInfoPost200ResponseError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | Option<**i32**> | | [optional] -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200ResponseResult.md deleted file mode 100644 index 5eb74a53fb..0000000000 --- a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200ResponseResult.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetBatchAddressUpdateInfoPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**addresses** | [**Vec**](AddressQueueIndex.md) | | -**context** | [**models::Context**](Context.md) | | -**non_inclusion_proofs** | [**Vec**](MerkleContextWithNewAddressProof.md) | | -**start_index** | **i32** | | -**subtrees** | [**Vec**](std::path::PathBuf.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost429Response.md b/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost429Response.md deleted file mode 100644 index 32e41580a8..0000000000 --- a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost429Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetBatchAddressUpdateInfoPost429Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | Option<**String**> | | [optional] -**jsonrpc** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPostRequest.md b/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPostRequest.md deleted file mode 100644 index 8f3ae0e8bc..0000000000 --- a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetBatchAddressUpdateInfoPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetBatchAddressUpdateInfoPostRequestParams**](_getBatchAddressUpdateInfo_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPostRequestParams.md b/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPostRequestParams.md deleted file mode 100644 index c8e2542755..0000000000 --- a/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPostRequestParams.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetBatchAddressUpdateInfoPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **i32** | | -**start_queue_index** | Option<**i32**> | | [optional] -**tree** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountBalancePost200Response.md b/sdk-libs/photon-api/docs/GetCompressedAccountBalancePost200Response.md deleted file mode 100644 index 38ec91f58f..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountBalancePost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountBalancePost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedAccountBalancePost200ResponseResult**](_getCompressedAccountBalance_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountBalancePost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedAccountBalancePost200ResponseResult.md deleted file mode 100644 index 46a5f73e44..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountBalancePost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedAccountBalancePost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | **i32** | | [default to 100] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountBalancePostRequest.md b/sdk-libs/photon-api/docs/GetCompressedAccountBalancePostRequest.md deleted file mode 100644 index 189eaf5ba3..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountBalancePostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountBalancePostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountPostRequestParams**](_getCompressedAccount_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountPost200Response.md b/sdk-libs/photon-api/docs/GetCompressedAccountPost200Response.md deleted file mode 100644 index 804779f0d4..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedAccountPost200ResponseResult**](_getCompressedAccount_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedAccountPost200ResponseResult.md deleted file mode 100644 index 0392938011..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedAccountPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | Option<[**models::Account**](Account.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountPostRequest.md b/sdk-libs/photon-api/docs/GetCompressedAccountPostRequest.md deleted file mode 100644 index a494d555ef..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountPostRequestParams**](_getCompressedAccount_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountPostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressedAccountPostRequestParams.md deleted file mode 100644 index 1389523feb..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountPostRequestParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedAccountPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | Option<**String**> | A Solana public key represented as a base58 string. | [optional] -**hash** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofPost200Response.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofPost200Response.md deleted file mode 100644 index 98dc2f9b5f..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountProofPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedAccountProofPost200ResponseResult**](_getCompressedAccountProof_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofPost200ResponseResult.md deleted file mode 100644 index 27592f906b..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedAccountProofPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::GetCompressedAccountProofResponseValue**](GetCompressedAccountProofResponseValue.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofPostRequest.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofPostRequest.md deleted file mode 100644 index d644c85e3a..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountProofPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountProofPostRequestParams**](_getCompressedAccountProof_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofPostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofPostRequestParams.md deleted file mode 100644 index 373cd706ea..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofPostRequestParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCompressedAccountProofPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hash** | **String** | A 32-byte hash represented as a base58 string. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofResponseValue.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofResponseValue.md deleted file mode 100644 index 0709ad1e47..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofResponseValue.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetCompressedAccountProofResponseValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hash** | **String** | A 32-byte hash represented as a base58 string. | -**leaf_index** | **i32** | | -**merkle_tree** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**proof** | **Vec** | | -**root** | **String** | A 32-byte hash represented as a base58 string. | -**root_seq** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofResponseValueV2.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofResponseValueV2.md deleted file mode 100644 index d872330c3b..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofResponseValueV2.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetCompressedAccountProofResponseValueV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hash** | **String** | A 32-byte hash represented as a base58 string. | -**leaf_index** | **i32** | | -**proof** | **Vec** | | -**prove_by_index** | **bool** | | -**root** | **String** | A 32-byte hash represented as a base58 string. | -**root_seq** | **i32** | | -**tree_context** | [**models::TreeContextInfo**](TreeContextInfo.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofV2Post200Response.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofV2Post200Response.md deleted file mode 100644 index 7fb243fbec..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountProofV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedAccountProofV2Post200ResponseResult**](_getCompressedAccountProofV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofV2Post200ResponseResult.md deleted file mode 100644 index 332804c966..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedAccountProofV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::GetCompressedAccountProofResponseValueV2**](GetCompressedAccountProofResponseValueV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountProofV2PostRequest.md b/sdk-libs/photon-api/docs/GetCompressedAccountProofV2PostRequest.md deleted file mode 100644 index 1777651154..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountProofV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountProofV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountProofPostRequestParams**](_getCompressedAccountProof_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountV2Post200Response.md b/sdk-libs/photon-api/docs/GetCompressedAccountV2Post200Response.md deleted file mode 100644 index ccbf9e9e5d..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedAccountV2Post200ResponseResult**](_getCompressedAccountV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedAccountV2Post200ResponseResult.md deleted file mode 100644 index 59a565ad5b..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedAccountV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | Option<[**models::AccountV2**](AccountV2.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountV2PostRequest.md b/sdk-libs/photon-api/docs/GetCompressedAccountV2PostRequest.md deleted file mode 100644 index 68dcfd2dc8..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountPostRequestParams**](_getCompressedAccount_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPost200Response.md b/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPost200Response.md deleted file mode 100644 index ef8cea0c6f..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountsByOwnerPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedAccountsByOwnerPost200ResponseResult**](_getCompressedAccountsByOwner_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPost200ResponseResult.md deleted file mode 100644 index 94ddeda3c6..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedAccountsByOwnerPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::PaginatedAccountList**](PaginatedAccountList.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPostRequest.md b/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPostRequest.md deleted file mode 100644 index c71cd517b4..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountsByOwnerPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountsByOwnerPostRequestParams**](_getCompressedAccountsByOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPostRequestParams.md deleted file mode 100644 index 6369df4f05..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPostRequestParams.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetCompressedAccountsByOwnerPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional] -**data_slice** | Option<[**models::DataSlice**](DataSlice.md)> | | [optional] -**filters** | Option<[**Vec**](FilterSelector.md)> | | [optional] -**limit** | Option<**i32**> | | [optional] -**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2Post200Response.md b/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2Post200Response.md deleted file mode 100644 index 7a207b4037..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountsByOwnerV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedAccountsByOwnerV2Post200ResponseResult**](_getCompressedAccountsByOwnerV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2Post200ResponseResult.md deleted file mode 100644 index 6df5864fca..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedAccountsByOwnerV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::PaginatedAccountListV2**](PaginatedAccountListV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2PostRequest.md b/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2PostRequest.md deleted file mode 100644 index 0a3f6e28d9..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedAccountsByOwnerV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountsByOwnerPostRequestParams**](_getCompressedAccountsByOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedBalanceByOwnerPostRequest.md b/sdk-libs/photon-api/docs/GetCompressedBalanceByOwnerPostRequest.md deleted file mode 100644 index e6d0e16464..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedBalanceByOwnerPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedBalanceByOwnerPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedBalanceByOwnerPostRequestParams**](_getCompressedBalanceByOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedBalanceByOwnerPostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressedBalanceByOwnerPostRequestParams.md deleted file mode 100644 index 3dcfa04c93..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedBalanceByOwnerPostRequestParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCompressedBalanceByOwnerPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPost200Response.md b/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPost200Response.md deleted file mode 100644 index 36b797b193..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedMintTokenHoldersPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedMintTokenHoldersPost200ResponseResult**](_getCompressedMintTokenHolders_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPost200ResponseResult.md deleted file mode 100644 index 89ff11d13a..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedMintTokenHoldersPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::OwnerBalanceList**](OwnerBalanceList.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPostRequest.md b/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPostRequest.md deleted file mode 100644 index 3ec8cdb1bc..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedMintTokenHoldersPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedMintTokenHoldersPostRequestParams**](_getCompressedMintTokenHolders_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPostRequestParams.md deleted file mode 100644 index ff6b5ccdab..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPostRequestParams.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetCompressedMintTokenHoldersPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A base 58 encoded string. | [optional] -**limit** | Option<**i32**> | | [optional] -**mint** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePost200Response.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePost200Response.md deleted file mode 100644 index 0bfb910694..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountBalancePost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedTokenAccountBalancePost200ResponseResult**](_getCompressedTokenAccountBalance_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePost200ResponseResult.md deleted file mode 100644 index 1f576d0411..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedTokenAccountBalancePost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::TokenAccountBalance**](TokenAccountBalance.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePostRequest.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePostRequest.md deleted file mode 100644 index 2330b1dd74..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountBalancePostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountPostRequestParams**](_getCompressedAccount_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePost200Response.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePost200Response.md deleted file mode 100644 index a1678bf8ae..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountsByDelegatePost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedTokenAccountsByDelegatePost200ResponseResult**](_getCompressedTokenAccountsByDelegate_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePost200ResponseResult.md deleted file mode 100644 index 753fad62b1..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedTokenAccountsByDelegatePost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::TokenAccountList**](TokenAccountList.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePostRequest.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePostRequest.md deleted file mode 100644 index c6ac52cabf..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountsByDelegatePostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedTokenAccountsByDelegatePostRequestParams**](_getCompressedTokenAccountsByDelegate_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePostRequestParams.md deleted file mode 100644 index 388528701a..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePostRequestParams.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountsByDelegatePostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A base 58 encoded string. | [optional] -**delegate** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**limit** | Option<**i32**> | | [optional] -**mint** | Option<**String**> | A Solana public key represented as a base58 string. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2Post200Response.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2Post200Response.md deleted file mode 100644 index 0348777039..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountsByDelegateV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedTokenAccountsByDelegateV2Post200ResponseResult**](_getCompressedTokenAccountsByDelegateV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2Post200ResponseResult.md deleted file mode 100644 index 4dce6c9b5e..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedTokenAccountsByDelegateV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::TokenAccountListV2**](TokenAccountListV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2PostRequest.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2PostRequest.md deleted file mode 100644 index fb83da10d4..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountsByDelegateV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedTokenAccountsByDelegatePostRequestParams**](_getCompressedTokenAccountsByDelegate_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerPostRequest.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerPostRequest.md deleted file mode 100644 index 050463b1d7..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountsByOwnerPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedTokenAccountsByOwnerPostRequestParams**](_getCompressedTokenAccountsByOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerPostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerPostRequestParams.md deleted file mode 100644 index 940ec17af6..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerPostRequestParams.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountsByOwnerPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A base 58 encoded string. | [optional] -**limit** | Option<**i32**> | | [optional] -**mint** | Option<**String**> | A Solana public key represented as a base58 string. | [optional] -**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerV2PostRequest.md b/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerV2PostRequest.md deleted file mode 100644 index 1656fb3925..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenAccountsByOwnerV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedTokenAccountsByOwnerPostRequestParams**](_getCompressedTokenAccountsByOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPost200Response.md b/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPost200Response.md deleted file mode 100644 index c1030fa37c..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenBalancesByOwnerPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedTokenBalancesByOwnerPost200ResponseResult**](_getCompressedTokenBalancesByOwner_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPost200ResponseResult.md deleted file mode 100644 index 6ff06b3af1..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedTokenBalancesByOwnerPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::TokenBalanceList**](TokenBalanceList.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPostRequest.md b/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPostRequest.md deleted file mode 100644 index 6b9bbfc034..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenBalancesByOwnerPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedTokenAccountsByOwnerPostRequestParams**](_getCompressedTokenAccountsByOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2Post200Response.md b/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2Post200Response.md deleted file mode 100644 index c3715078c8..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenBalancesByOwnerV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressedTokenBalancesByOwnerV2Post200ResponseResult**](_getCompressedTokenBalancesByOwnerV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2Post200ResponseResult.md deleted file mode 100644 index 45d0dcaa85..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressedTokenBalancesByOwnerV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::TokenBalanceListV2**](TokenBalanceListV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2PostRequest.md b/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2PostRequest.md deleted file mode 100644 index 555c1ab27d..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressedTokenBalancesByOwnerV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedTokenAccountsByOwnerPostRequestParams**](_getCompressedTokenAccountsByOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPost200Response.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPost200Response.md deleted file mode 100644 index 514f210324..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressionSignaturesForAccountPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressionSignaturesForAccountPost200ResponseResult**](_getCompressionSignaturesForAccount_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPost200ResponseResult.md deleted file mode 100644 index d911143495..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressionSignaturesForAccountPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::SignatureInfoList**](SignatureInfoList.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPostRequest.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPostRequest.md deleted file mode 100644 index 2622b6b87e..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressionSignaturesForAccountPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressedAccountProofPostRequestParams**](_getCompressedAccountProof_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPost200Response.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPost200Response.md deleted file mode 100644 index 6884e18a43..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressionSignaturesForAddressPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetCompressionSignaturesForAddressPost200ResponseResult**](_getCompressionSignaturesForAddress_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPost200ResponseResult.md deleted file mode 100644 index dfee2078f1..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompressionSignaturesForAddressPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::PaginatedSignatureInfoList**](PaginatedSignatureInfoList.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPostRequest.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPostRequest.md deleted file mode 100644 index 9191f93ffb..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressionSignaturesForAddressPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressionSignaturesForAddressPostRequestParams**](_getCompressionSignaturesForAddress_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPostRequestParams.md deleted file mode 100644 index 7e427831e5..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPostRequestParams.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetCompressionSignaturesForAddressPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**cursor** | Option<**String**> | | [optional] -**limit** | Option<**i32**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForOwnerPostRequest.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForOwnerPostRequest.md deleted file mode 100644 index 735f283ee6..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForOwnerPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressionSignaturesForOwnerPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressionSignaturesForOwnerPostRequestParams**](_getCompressionSignaturesForOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForOwnerPostRequestParams.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForOwnerPostRequestParams.md deleted file mode 100644 index 764ac02df9..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForOwnerPostRequestParams.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetCompressionSignaturesForOwnerPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | | [optional] -**limit** | Option<**i32**> | | [optional] -**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetCompressionSignaturesForTokenOwnerPostRequest.md b/sdk-libs/photon-api/docs/GetCompressionSignaturesForTokenOwnerPostRequest.md deleted file mode 100644 index 041252d30f..0000000000 --- a/sdk-libs/photon-api/docs/GetCompressionSignaturesForTokenOwnerPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetCompressionSignaturesForTokenOwnerPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetCompressionSignaturesForOwnerPostRequestParams**](_getCompressionSignaturesForOwner_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetIndexerHealthPost200Response.md b/sdk-libs/photon-api/docs/GetIndexerHealthPost200Response.md deleted file mode 100644 index 8e0ce13450..0000000000 --- a/sdk-libs/photon-api/docs/GetIndexerHealthPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetIndexerHealthPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<**String**> | ok if healthy | [optional][default to Ok] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetIndexerHealthPostRequest.md b/sdk-libs/photon-api/docs/GetIndexerHealthPostRequest.md deleted file mode 100644 index e132892839..0000000000 --- a/sdk-libs/photon-api/docs/GetIndexerHealthPostRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetIndexerHealthPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetIndexerSlotPost200Response.md b/sdk-libs/photon-api/docs/GetIndexerSlotPost200Response.md deleted file mode 100644 index 2c282efd69..0000000000 --- a/sdk-libs/photon-api/docs/GetIndexerSlotPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetIndexerSlotPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<**i32**> | | [optional][default to 100] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetIndexerSlotPostRequest.md b/sdk-libs/photon-api/docs/GetIndexerSlotPostRequest.md deleted file mode 100644 index 3f76ccd0e1..0000000000 --- a/sdk-libs/photon-api/docs/GetIndexerSlotPostRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetIndexerSlotPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetLatestCompressionSignaturesPostRequest.md b/sdk-libs/photon-api/docs/GetLatestCompressionSignaturesPostRequest.md deleted file mode 100644 index eb86540db8..0000000000 --- a/sdk-libs/photon-api/docs/GetLatestCompressionSignaturesPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetLatestCompressionSignaturesPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetLatestCompressionSignaturesPostRequestParams**](_getLatestCompressionSignatures_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetLatestCompressionSignaturesPostRequestParams.md b/sdk-libs/photon-api/docs/GetLatestCompressionSignaturesPostRequestParams.md deleted file mode 100644 index 37b999db7e..0000000000 --- a/sdk-libs/photon-api/docs/GetLatestCompressionSignaturesPostRequestParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLatestCompressionSignaturesPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | | [optional] -**limit** | Option<**i32**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPost200Response.md b/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPost200Response.md deleted file mode 100644 index 1213923d40..0000000000 --- a/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetLatestNonVotingSignaturesPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetLatestNonVotingSignaturesPost200ResponseResult**](_getLatestNonVotingSignatures_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPost200ResponseResult.md deleted file mode 100644 index 5ea49a3a32..0000000000 --- a/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLatestNonVotingSignaturesPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::SignatureInfoListWithError**](SignatureInfoListWithError.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPostRequest.md b/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPostRequest.md deleted file mode 100644 index 28cd722650..0000000000 --- a/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetLatestNonVotingSignaturesPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetLatestCompressionSignaturesPostRequestParams**](_getLatestCompressionSignatures_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPost200Response.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPost200Response.md deleted file mode 100644 index 1d6b0604b9..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleCompressedAccountProofsPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetMultipleCompressedAccountProofsPost200ResponseResult**](_getMultipleCompressedAccountProofs_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPost200ResponseResult.md deleted file mode 100644 index 10c6ea0e83..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMultipleCompressedAccountProofsPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**Vec**](GetCompressedAccountProofResponseValue.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPostRequest.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPostRequest.md deleted file mode 100644 index 8abbead8b5..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleCompressedAccountProofsPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | **Vec** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2Post200Response.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2Post200Response.md deleted file mode 100644 index cb0643ef4c..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleCompressedAccountProofsV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetMultipleCompressedAccountProofsV2Post200ResponseResult**](_getMultipleCompressedAccountProofsV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2Post200ResponseResult.md deleted file mode 100644 index b62ae79753..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMultipleCompressedAccountProofsV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**Vec**](GetCompressedAccountProofResponseValueV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2PostRequest.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2PostRequest.md deleted file mode 100644 index 6c1f1a9291..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleCompressedAccountProofsV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | **Vec** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPost200Response.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPost200Response.md deleted file mode 100644 index b49a569771..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleCompressedAccountsPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetMultipleCompressedAccountsPost200ResponseResult**](_getMultipleCompressedAccounts_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPost200ResponseResult.md deleted file mode 100644 index 5f2958fabb..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMultipleCompressedAccountsPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::AccountList**](AccountList.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPostRequest.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPostRequest.md deleted file mode 100644 index a1c706fdf9..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleCompressedAccountsPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetMultipleCompressedAccountsPostRequestParams**](_getMultipleCompressedAccounts_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPostRequestParams.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPostRequestParams.md deleted file mode 100644 index 390917a7e6..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPostRequestParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMultipleCompressedAccountsPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**addresses** | Option<**Vec**> | | [optional] -**hashes** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2Post200Response.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2Post200Response.md deleted file mode 100644 index 99a3fb80c5..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleCompressedAccountsV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetMultipleCompressedAccountsV2Post200ResponseResult**](_getMultipleCompressedAccountsV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2Post200ResponseResult.md deleted file mode 100644 index e7f1ec708c..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMultipleCompressedAccountsV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::AccountListV2**](AccountListV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2PostRequest.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2PostRequest.md deleted file mode 100644 index a7dc69e9af..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleCompressedAccountsV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetMultipleCompressedAccountsV2PostRequestParams**](_getMultipleCompressedAccountsV2_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2PostRequestParams.md b/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2PostRequestParams.md deleted file mode 100644 index 928d9a3067..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2PostRequestParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMultipleCompressedAccountsV2PostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**addresses** | Option<**Vec**> | | [optional] -**hashes** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPost200Response.md b/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPost200Response.md deleted file mode 100644 index 5a1a50df34..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleNewAddressProofsPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetMultipleNewAddressProofsPost200ResponseResult**](_getMultipleNewAddressProofs_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPost200ResponseResult.md deleted file mode 100644 index e402894103..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMultipleNewAddressProofsPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**Vec**](MerkleContextWithNewAddressProof.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPostRequest.md b/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPostRequest.md deleted file mode 100644 index e1b0c1be21..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleNewAddressProofsPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | **Vec** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsV2PostRequest.md b/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsV2PostRequest.md deleted file mode 100644 index f392e317f1..0000000000 --- a/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMultipleNewAddressProofsV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**Vec**](AddressWithTree.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetQueueElementsPost200Response.md b/sdk-libs/photon-api/docs/GetQueueElementsPost200Response.md deleted file mode 100644 index 8e2656d63e..0000000000 --- a/sdk-libs/photon-api/docs/GetQueueElementsPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetQueueElementsPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetQueueElementsPost200ResponseResult**](_getQueueElements_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetQueueElementsPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetQueueElementsPost200ResponseResult.md deleted file mode 100644 index 6e7b346acb..0000000000 --- a/sdk-libs/photon-api/docs/GetQueueElementsPost200ResponseResult.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetQueueElementsPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**first_value_queue_index** | **i32** | | -**value** | [**Vec**](GetQueueElementsResponseValue.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetQueueElementsPostRequest.md b/sdk-libs/photon-api/docs/GetQueueElementsPostRequest.md deleted file mode 100644 index a7f0c7c262..0000000000 --- a/sdk-libs/photon-api/docs/GetQueueElementsPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetQueueElementsPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetQueueElementsPostRequestParams**](_getQueueElements_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetQueueElementsPostRequestParams.md b/sdk-libs/photon-api/docs/GetQueueElementsPostRequestParams.md deleted file mode 100644 index 02316952f5..0000000000 --- a/sdk-libs/photon-api/docs/GetQueueElementsPostRequestParams.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetQueueElementsPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **i32** | | -**queue_type** | **i32** | | -**start_queue_index** | Option<**i32**> | | [optional] -**tree** | **String** | A 32-byte hash represented as a base58 string. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetQueueElementsResponseValue.md b/sdk-libs/photon-api/docs/GetQueueElementsResponseValue.md deleted file mode 100644 index f248b0de0f..0000000000 --- a/sdk-libs/photon-api/docs/GetQueueElementsResponseValue.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetQueueElementsResponseValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_hash** | **String** | A 32-byte hash represented as a base58 string. | -**leaf** | **String** | A 32-byte hash represented as a base58 string. | -**leaf_index** | **i32** | | -**proof** | **Vec** | | -**root** | **String** | A 32-byte hash represented as a base58 string. | -**root_seq** | **i32** | | -**tree** | **String** | A 32-byte hash represented as a base58 string. | -**tx_hash** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200Response.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200Response.md deleted file mode 100644 index 05a368d433..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetTransactionWithCompressionInfoPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetTransactionWithCompressionInfoPost200ResponseResult**](_getTransactionWithCompressionInfo_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200ResponseResult.md deleted file mode 100644 index c53464b187..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetTransactionWithCompressionInfoPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**compression_info** | Option<[**models::GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo**](_getTransactionWithCompressionInfo_post_200_response_result_compression_info.md)> | | [optional] -**transaction** | Option<[**serde_json::Value**](.md)> | An encoded confirmed transaction with status meta | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo.md deleted file mode 100644 index f345bebb0e..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**closed_accounts** | [**Vec**](AccountWithOptionalTokenData.md) | | -**opened_accounts** | [**Vec**](AccountWithOptionalTokenData.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPostRequest.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPostRequest.md deleted file mode 100644 index 401e813764..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetTransactionWithCompressionInfoPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetTransactionWithCompressionInfoPostRequestParams**](_getTransactionWithCompressionInfo_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPostRequestParams.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPostRequestParams.md deleted file mode 100644 index 3d590ec8b4..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPostRequestParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTransactionWithCompressionInfoPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**signature** | **String** | A Solana transaction signature. | [default to 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200Response.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200Response.md deleted file mode 100644 index a6232e0e57..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetTransactionWithCompressionInfoV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetTransactionWithCompressionInfoV2Post200ResponseResult**](_getTransactionWithCompressionInfoV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200ResponseResult.md deleted file mode 100644 index 187563ce26..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetTransactionWithCompressionInfoV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**compression_info** | Option<[**models::GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo**](_getTransactionWithCompressionInfoV2_post_200_response_result_compression_info.md)> | | [optional] -**transaction** | Option<[**serde_json::Value**](.md)> | An encoded confirmed transaction with status meta | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo.md deleted file mode 100644 index 3c637ea973..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**closed_accounts** | [**Vec**](ClosedAccountWithOptionalTokenDataV2.md) | | -**opened_accounts** | [**Vec**](AccountWithOptionalTokenDataV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2PostRequest.md b/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2PostRequest.md deleted file mode 100644 index dcadfcb50e..0000000000 --- a/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetTransactionWithCompressionInfoV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetTransactionWithCompressionInfoPostRequestParams**](_getTransactionWithCompressionInfo_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetValidityProofPost200Response.md b/sdk-libs/photon-api/docs/GetValidityProofPost200Response.md deleted file mode 100644 index 0b6b7ebded..0000000000 --- a/sdk-libs/photon-api/docs/GetValidityProofPost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetValidityProofPost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetValidityProofPost200ResponseResult**](_getValidityProof_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetValidityProofPost200ResponseResult.md b/sdk-libs/photon-api/docs/GetValidityProofPost200ResponseResult.md deleted file mode 100644 index 5de84ddbda..0000000000 --- a/sdk-libs/photon-api/docs/GetValidityProofPost200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetValidityProofPost200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::CompressedProofWithContext**](CompressedProofWithContext.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetValidityProofPostRequest.md b/sdk-libs/photon-api/docs/GetValidityProofPostRequest.md deleted file mode 100644 index 8bdde8d269..0000000000 --- a/sdk-libs/photon-api/docs/GetValidityProofPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetValidityProofPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetValidityProofPostRequestParams**](_getValidityProof_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetValidityProofPostRequestParams.md b/sdk-libs/photon-api/docs/GetValidityProofPostRequestParams.md deleted file mode 100644 index 1a00139dab..0000000000 --- a/sdk-libs/photon-api/docs/GetValidityProofPostRequestParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetValidityProofPostRequestParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hashes** | Option<**Vec**> | | [optional] -**new_addresses_with_trees** | Option<[**Vec**](AddressWithTree.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetValidityProofV2Post200Response.md b/sdk-libs/photon-api/docs/GetValidityProofV2Post200Response.md deleted file mode 100644 index ca7e75fc43..0000000000 --- a/sdk-libs/photon-api/docs/GetValidityProofV2Post200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetValidityProofV2Post200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional] -**id** | **String** | An ID to identify the response. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**result** | Option<[**models::GetValidityProofV2Post200ResponseResult**](_getValidityProofV2_post_200_response_result.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetValidityProofV2Post200ResponseResult.md b/sdk-libs/photon-api/docs/GetValidityProofV2Post200ResponseResult.md deleted file mode 100644 index 3bf19e72e8..0000000000 --- a/sdk-libs/photon-api/docs/GetValidityProofV2Post200ResponseResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetValidityProofV2Post200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::CompressedProofWithContextV2**](CompressedProofWithContextV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/GetValidityProofV2PostRequest.md b/sdk-libs/photon-api/docs/GetValidityProofV2PostRequest.md deleted file mode 100644 index 1faca98a50..0000000000 --- a/sdk-libs/photon-api/docs/GetValidityProofV2PostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetValidityProofV2PostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An ID to identify the request. | -**jsonrpc** | **String** | The version of the JSON-RPC protocol. | -**method** | **String** | The name of the method to invoke. | -**params** | [**models::GetValidityProofPostRequestParams**](_getValidityProof_post_request_params.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/Memcmp.md b/sdk-libs/photon-api/docs/Memcmp.md deleted file mode 100644 index 9cd5afc4c2..0000000000 --- a/sdk-libs/photon-api/docs/Memcmp.md +++ /dev/null @@ -1,12 +0,0 @@ -# Memcmp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bytes** | **String** | A base 58 encoded string. | [default to 3J98t1WpEZ73CNm] -**offset** | **u32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/MerkleContextV2.md b/sdk-libs/photon-api/docs/MerkleContextV2.md deleted file mode 100644 index 8eccad3a79..0000000000 --- a/sdk-libs/photon-api/docs/MerkleContextV2.md +++ /dev/null @@ -1,15 +0,0 @@ -# MerkleContextV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cpi_context** | Option<**String**> | A Solana public key represented as a base58 string. | [optional][default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**next_tree_context** | Option<[**models::TreeContextInfo**](TreeContextInfo.md)> | | [optional] -**queue** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**tree** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**tree_type** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/MerkleContextWithNewAddressProof.md b/sdk-libs/photon-api/docs/MerkleContextWithNewAddressProof.md deleted file mode 100644 index 8ced90a79c..0000000000 --- a/sdk-libs/photon-api/docs/MerkleContextWithNewAddressProof.md +++ /dev/null @@ -1,19 +0,0 @@ -# MerkleContextWithNewAddressProof - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**higher_range_address** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**low_element_leaf_index** | **i32** | | -**lower_range_address** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**merkle_tree** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**next_index** | **i32** | | -**proof** | **Vec** | | -**root** | **String** | A 32-byte hash represented as a base58 string. | -**root_seq** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/OwnerBalance.md b/sdk-libs/photon-api/docs/OwnerBalance.md deleted file mode 100644 index 406ba5b9ce..0000000000 --- a/sdk-libs/photon-api/docs/OwnerBalance.md +++ /dev/null @@ -1,12 +0,0 @@ -# OwnerBalance - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**balance** | **i32** | | [default to 100] -**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/OwnerBalanceList.md b/sdk-libs/photon-api/docs/OwnerBalanceList.md deleted file mode 100644 index 5229bc0856..0000000000 --- a/sdk-libs/photon-api/docs/OwnerBalanceList.md +++ /dev/null @@ -1,12 +0,0 @@ -# OwnerBalanceList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm] -**items** | [**Vec**](OwnerBalance.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/OwnerBalancesResponse.md b/sdk-libs/photon-api/docs/OwnerBalancesResponse.md deleted file mode 100644 index 5c050554af..0000000000 --- a/sdk-libs/photon-api/docs/OwnerBalancesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# OwnerBalancesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | [**models::Context**](Context.md) | | -**value** | [**models::OwnerBalanceList**](OwnerBalanceList.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/PaginatedAccountList.md b/sdk-libs/photon-api/docs/PaginatedAccountList.md deleted file mode 100644 index 0c24bae6e1..0000000000 --- a/sdk-libs/photon-api/docs/PaginatedAccountList.md +++ /dev/null @@ -1,12 +0,0 @@ -# PaginatedAccountList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional] -**items** | [**Vec**](Account.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/PaginatedAccountListV2.md b/sdk-libs/photon-api/docs/PaginatedAccountListV2.md deleted file mode 100644 index da866d3af9..0000000000 --- a/sdk-libs/photon-api/docs/PaginatedAccountListV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# PaginatedAccountListV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional] -**items** | [**Vec**](AccountV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/PaginatedSignatureInfoList.md b/sdk-libs/photon-api/docs/PaginatedSignatureInfoList.md deleted file mode 100644 index 51cd66bd34..0000000000 --- a/sdk-libs/photon-api/docs/PaginatedSignatureInfoList.md +++ /dev/null @@ -1,12 +0,0 @@ -# PaginatedSignatureInfoList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | | [optional] -**items** | [**Vec**](SignatureInfo.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/RootIndex.md b/sdk-libs/photon-api/docs/RootIndex.md deleted file mode 100644 index a3ffee4d38..0000000000 --- a/sdk-libs/photon-api/docs/RootIndex.md +++ /dev/null @@ -1,12 +0,0 @@ -# RootIndex - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**prove_by_index** | **bool** | | -**root_index** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/SignatureInfo.md b/sdk-libs/photon-api/docs/SignatureInfo.md deleted file mode 100644 index 56a5ee3ed3..0000000000 --- a/sdk-libs/photon-api/docs/SignatureInfo.md +++ /dev/null @@ -1,13 +0,0 @@ -# SignatureInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**block_time** | **i32** | An Unix timestamp (seconds) | [default to 1714081554] -**signature** | **String** | A Solana transaction signature. | [default to 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c] -**slot** | **i32** | | [default to 100] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/SignatureInfoList.md b/sdk-libs/photon-api/docs/SignatureInfoList.md deleted file mode 100644 index f1b06ac576..0000000000 --- a/sdk-libs/photon-api/docs/SignatureInfoList.md +++ /dev/null @@ -1,11 +0,0 @@ -# SignatureInfoList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**Vec**](SignatureInfo.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/SignatureInfoListWithError.md b/sdk-libs/photon-api/docs/SignatureInfoListWithError.md deleted file mode 100644 index 8cb680b433..0000000000 --- a/sdk-libs/photon-api/docs/SignatureInfoListWithError.md +++ /dev/null @@ -1,11 +0,0 @@ -# SignatureInfoListWithError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**Vec**](SignatureInfoWithError.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/SignatureInfoWithError.md b/sdk-libs/photon-api/docs/SignatureInfoWithError.md deleted file mode 100644 index a51da9f6c5..0000000000 --- a/sdk-libs/photon-api/docs/SignatureInfoWithError.md +++ /dev/null @@ -1,14 +0,0 @@ -# SignatureInfoWithError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**block_time** | **i32** | An Unix timestamp (seconds) | [default to 1714081554] -**error** | Option<**String**> | | [optional] -**signature** | **String** | A Solana transaction signature. | [default to 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c] -**slot** | **i32** | | [default to 100] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenAccount.md b/sdk-libs/photon-api/docs/TokenAccount.md deleted file mode 100644 index 584624af00..0000000000 --- a/sdk-libs/photon-api/docs/TokenAccount.md +++ /dev/null @@ -1,12 +0,0 @@ -# TokenAccount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [**models::Account**](Account.md) | | -**token_data** | [**models::TokenData**](TokenData.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenAccountBalance.md b/sdk-libs/photon-api/docs/TokenAccountBalance.md deleted file mode 100644 index f2c5d05bf0..0000000000 --- a/sdk-libs/photon-api/docs/TokenAccountBalance.md +++ /dev/null @@ -1,11 +0,0 @@ -# TokenAccountBalance - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount** | **i32** | | [default to 100] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenAccountList.md b/sdk-libs/photon-api/docs/TokenAccountList.md deleted file mode 100644 index c934f96328..0000000000 --- a/sdk-libs/photon-api/docs/TokenAccountList.md +++ /dev/null @@ -1,12 +0,0 @@ -# TokenAccountList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm] -**items** | [**Vec**](TokenAccount.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenAccountListV2.md b/sdk-libs/photon-api/docs/TokenAccountListV2.md deleted file mode 100644 index 363fa3954e..0000000000 --- a/sdk-libs/photon-api/docs/TokenAccountListV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# TokenAccountListV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm] -**items** | [**Vec**](TokenAccountV2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenAccountV2.md b/sdk-libs/photon-api/docs/TokenAccountV2.md deleted file mode 100644 index 3574d9cea5..0000000000 --- a/sdk-libs/photon-api/docs/TokenAccountV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# TokenAccountV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [**models::AccountV2**](AccountV2.md) | | -**token_data** | [**models::TokenData**](TokenData.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenBalance.md b/sdk-libs/photon-api/docs/TokenBalance.md deleted file mode 100644 index 43b08d66a7..0000000000 --- a/sdk-libs/photon-api/docs/TokenBalance.md +++ /dev/null @@ -1,12 +0,0 @@ -# TokenBalance - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**balance** | **i32** | | [default to 100] -**mint** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenBalanceList.md b/sdk-libs/photon-api/docs/TokenBalanceList.md deleted file mode 100644 index e60eeed199..0000000000 --- a/sdk-libs/photon-api/docs/TokenBalanceList.md +++ /dev/null @@ -1,12 +0,0 @@ -# TokenBalanceList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm] -**token_balances** | [**Vec**](TokenBalance.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenBalanceListV2.md b/sdk-libs/photon-api/docs/TokenBalanceListV2.md deleted file mode 100644 index 5a60e0ccc0..0000000000 --- a/sdk-libs/photon-api/docs/TokenBalanceListV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# TokenBalanceListV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm] -**items** | [**Vec**](TokenBalance.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TokenData.md b/sdk-libs/photon-api/docs/TokenData.md deleted file mode 100644 index a9789337ef..0000000000 --- a/sdk-libs/photon-api/docs/TokenData.md +++ /dev/null @@ -1,16 +0,0 @@ -# TokenData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount** | **i32** | | [default to 100] -**delegate** | Option<**String**> | A Solana public key represented as a base58 string. | [optional][default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**mint** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**state** | [**models::AccountState**](AccountState.md) | | -**tlv** | Option<**String**> | A base 64 encoded string. | [optional][default to SGVsbG8sIFdvcmxkIQ==] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/docs/TreeContextInfo.md b/sdk-libs/photon-api/docs/TreeContextInfo.md deleted file mode 100644 index 807c2e3d70..0000000000 --- a/sdk-libs/photon-api/docs/TreeContextInfo.md +++ /dev/null @@ -1,14 +0,0 @@ -# TreeContextInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cpi_context** | Option<**String**> | A Solana public key represented as a base58 string. | [optional][default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**queue** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**tree** | **String** | A Solana public key represented as a base58 string. | [default to 11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs] -**tree_type** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk-libs/photon-api/git_push.sh b/sdk-libs/photon-api/git_push.sh deleted file mode 100644 index f53a75d4fa..0000000000 --- a/sdk-libs/photon-api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/sdk-libs/photon-api/src/apis/configuration.rs b/sdk-libs/photon-api/src/apis/configuration.rs deleted file mode 100644 index e9c4429eac..0000000000 --- a/sdk-libs/photon-api/src/apis/configuration.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Debug, Clone)] -pub struct Configuration { - pub base_path: String, - pub user_agent: Option, - pub client: reqwest::Client, - pub basic_auth: Option, - pub oauth_access_token: Option, - pub bearer_access_token: Option, - pub api_key: Option, - // TODO: take an oauth2 token source, similar to the go one -} - -pub type BasicAuth = (String, Option); - -#[derive(Debug, Clone)] -pub struct ApiKey { - pub prefix: Option, - pub key: String, -} - -impl Configuration { - pub fn new() -> Configuration { - Configuration::default() - } - - pub fn new_with_api(url: String, api_key: Option) -> Configuration { - Configuration { - base_path: url, - api_key: api_key.map(|key| ApiKey { - prefix: Some("api-key".to_string()), - key, - }), - ..Default::default() - } - } -} - -impl Default for Configuration { - fn default() -> Self { - Configuration { - base_path: "https://devnet.helius-rpc.com?api-key=".to_owned(), - user_agent: Some("OpenAPI-Generator/0.50.0/rust".to_owned()), - client: reqwest::Client::new(), - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - } - } -} diff --git a/sdk-libs/photon-api/src/apis/default_api.rs b/sdk-libs/photon-api/src/apis/default_api.rs deleted file mode 100644 index d432e2d248..0000000000 --- a/sdk-libs/photon-api/src/apis/default_api.rs +++ /dev/null @@ -1,2210 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use reqwest; - -use super::{configuration, Error}; -use crate::{ - apis::{configuration::Configuration, ResponseContent}, - models, -}; - -/// struct for typed errors of method [`get_batch_address_update_info_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetBatchAddressUpdateInfoPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_account_balance_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedAccountBalancePostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_account_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedAccountPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_account_proof_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedAccountProofPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_account_proof_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedAccountProofV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_account_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedAccountV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_accounts_by_owner_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedAccountsByOwnerPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_accounts_by_owner_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedAccountsByOwnerV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_balance_by_owner_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedBalanceByOwnerPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_mint_token_holders_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedMintTokenHoldersPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_token_account_balance_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedTokenAccountBalancePostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_token_accounts_by_delegate_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedTokenAccountsByDelegatePostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_token_accounts_by_delegate_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedTokenAccountsByDelegateV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_token_accounts_by_owner_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedTokenAccountsByOwnerPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_token_accounts_by_owner_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedTokenAccountsByOwnerV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_token_balances_by_owner_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedTokenBalancesByOwnerPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compressed_token_balances_by_owner_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressedTokenBalancesByOwnerV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compression_signatures_for_account_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressionSignaturesForAccountPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compression_signatures_for_address_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressionSignaturesForAddressPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compression_signatures_for_owner_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressionSignaturesForOwnerPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_compression_signatures_for_token_owner_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetCompressionSignaturesForTokenOwnerPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_indexer_health_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetIndexerHealthPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_indexer_slot_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetIndexerSlotPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_latest_compression_signatures_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLatestCompressionSignaturesPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_latest_non_voting_signatures_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLatestNonVotingSignaturesPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_multiple_compressed_account_proofs_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMultipleCompressedAccountProofsPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_multiple_compressed_account_proofs_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMultipleCompressedAccountProofsV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_multiple_compressed_accounts_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMultipleCompressedAccountsPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_multiple_compressed_accounts_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMultipleCompressedAccountsV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_multiple_new_address_proofs_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMultipleNewAddressProofsPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_multiple_new_address_proofs_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMultipleNewAddressProofsV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_queue_info_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetQueueInfoPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_queue_elements_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetQueueElementsPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_transaction_with_compression_info_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetTransactionWithCompressionInfoPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_transaction_with_compression_info_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetTransactionWithCompressionInfoV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_validity_proof_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetValidityProofPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_validity_proof_v2_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetValidityProofV2PostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_account_interface_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetAccountInterfacePostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_token_account_interface_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetTokenAccountInterfacePostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_ata_interface_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetAtaInterfacePostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_multiple_account_interfaces_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMultipleAccountInterfacesPostError { - Status429(models::GetBatchAddressUpdateInfoPost429Response), - Status500(models::GetBatchAddressUpdateInfoPost429Response), - UnknownValue(serde_json::Value), -} - -pub async fn get_batch_address_update_info_post( - configuration: &configuration::Configuration, - get_batch_address_update_info_post_request: models::GetBatchAddressUpdateInfoPostRequest, -) -> Result< - models::GetBatchAddressUpdateInfoPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getBatchAddressUpdateInfo", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_batch_address_update_info_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_account_balance_post( - configuration: &configuration::Configuration, - get_compressed_account_balance_post_request: models::GetCompressedAccountBalancePostRequest, -) -> Result< - models::GetCompressedAccountBalancePost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedAccountBalance", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_account_balance_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_account_post( - configuration: &configuration::Configuration, - get_compressed_account_post_request: models::GetCompressedAccountPostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getCompressedAccount", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_compressed_account_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_account_proof_post( - configuration: &configuration::Configuration, - get_compressed_account_proof_post_request: models::GetCompressedAccountProofPostRequest, -) -> Result< - models::GetCompressedAccountProofPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedAccountProof", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_compressed_account_proof_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_account_proof_v2_post( - configuration: &configuration::Configuration, - get_compressed_account_proof_v2_post_request: models::GetCompressedAccountProofV2PostRequest, -) -> Result< - models::GetCompressedAccountProofV2Post200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedAccountProofV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_account_proof_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_account_v2_post( - configuration: &configuration::Configuration, - get_compressed_account_v2_post_request: models::GetCompressedAccountV2PostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedAccountV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_compressed_account_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_accounts_by_owner_post( - configuration: &configuration::Configuration, - get_compressed_accounts_by_owner_post_request: models::GetCompressedAccountsByOwnerPostRequest, -) -> Result< - models::GetCompressedAccountsByOwnerPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedAccountsByOwner", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_accounts_by_owner_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_accounts_by_owner_v2_post( - configuration: &configuration::Configuration, - get_compressed_accounts_by_owner_v2_post_request: models::GetCompressedAccountsByOwnerV2PostRequest, -) -> Result< - models::GetCompressedAccountsByOwnerV2Post200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedAccountsByOwnerV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_accounts_by_owner_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_balance_by_owner_post( - configuration: &configuration::Configuration, - get_compressed_balance_by_owner_post_request: models::GetCompressedBalanceByOwnerPostRequest, -) -> Result< - models::GetCompressedAccountBalancePost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedBalanceByOwner", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_balance_by_owner_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_mint_token_holders_post( - configuration: &configuration::Configuration, - get_compressed_mint_token_holders_post_request: models::GetCompressedMintTokenHoldersPostRequest, -) -> Result< - models::GetCompressedMintTokenHoldersPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedMintTokenHolders", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_mint_token_holders_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_token_account_balance_post( - configuration: &configuration::Configuration, - get_compressed_token_account_balance_post_request: models::GetCompressedTokenAccountBalancePostRequest, -) -> Result< - models::GetCompressedTokenAccountBalancePost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedTokenAccountBalance", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_token_account_balance_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_token_accounts_by_delegate_post( - configuration: &configuration::Configuration, - get_compressed_token_accounts_by_delegate_post_request: models::GetCompressedTokenAccountsByDelegatePostRequest, -) -> Result< - models::GetCompressedTokenAccountsByDelegatePost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedTokenAccountsByDelegate", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_token_accounts_by_delegate_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_token_accounts_by_delegate_v2_post( - configuration: &configuration::Configuration, - get_compressed_token_accounts_by_delegate_v2_post_request: models::GetCompressedTokenAccountsByDelegateV2PostRequest, -) -> Result< - models::GetCompressedTokenAccountsByDelegateV2Post200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedTokenAccountsByDelegateV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_token_accounts_by_delegate_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_token_accounts_by_owner_post( - configuration: &configuration::Configuration, - get_compressed_token_accounts_by_owner_post_request: models::GetCompressedTokenAccountsByOwnerPostRequest, -) -> Result< - models::GetCompressedTokenAccountsByDelegatePost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedTokenAccountsByOwner", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_token_accounts_by_owner_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_token_accounts_by_owner_v2_post( - configuration: &configuration::Configuration, - get_compressed_token_accounts_by_owner_v2_post_request: models::GetCompressedTokenAccountsByOwnerV2PostRequest, -) -> Result< - models::GetCompressedTokenAccountsByDelegateV2Post200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedTokenAccountsByOwnerV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_token_accounts_by_owner_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_token_balances_by_owner_post( - configuration: &configuration::Configuration, - get_compressed_token_balances_by_owner_post_request: models::GetCompressedTokenBalancesByOwnerPostRequest, -) -> Result< - models::GetCompressedTokenBalancesByOwnerPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedTokenBalancesByOwner", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_token_balances_by_owner_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compressed_token_balances_by_owner_v2_post( - configuration: &configuration::Configuration, - get_compressed_token_balances_by_owner_v2_post_request: models::GetCompressedTokenBalancesByOwnerV2PostRequest, -) -> Result< - models::GetCompressedTokenBalancesByOwnerV2Post200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressedTokenBalancesByOwnerV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compressed_token_balances_by_owner_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compression_signatures_for_account_post( - configuration: &configuration::Configuration, - get_compression_signatures_for_account_post_request: models::GetCompressionSignaturesForAccountPostRequest, -) -> Result< - models::GetCompressionSignaturesForAccountPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressionSignaturesForAccount", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compression_signatures_for_account_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compression_signatures_for_address_post( - configuration: &configuration::Configuration, - get_compression_signatures_for_address_post_request: models::GetCompressionSignaturesForAddressPostRequest, -) -> Result< - models::GetCompressionSignaturesForAddressPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressionSignaturesForAddress", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compression_signatures_for_address_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compression_signatures_for_owner_post( - configuration: &configuration::Configuration, - get_compression_signatures_for_owner_post_request: models::GetCompressionSignaturesForOwnerPostRequest, -) -> Result< - models::GetCompressionSignaturesForAddressPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressionSignaturesForOwner", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compression_signatures_for_owner_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_compression_signatures_for_token_owner_post( - configuration: &configuration::Configuration, - get_compression_signatures_for_token_owner_post_request: models::GetCompressionSignaturesForTokenOwnerPostRequest, -) -> Result< - models::GetCompressionSignaturesForAddressPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getCompressionSignaturesForTokenOwner", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_compression_signatures_for_token_owner_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_indexer_health_post( - configuration: &configuration::Configuration, - get_indexer_health_post_request: models::GetIndexerHealthPostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getIndexerHealth", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_indexer_health_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_indexer_slot_post( - configuration: &configuration::Configuration, - get_indexer_slot_post_request: models::GetIndexerSlotPostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getIndexerSlot", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_indexer_slot_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_latest_compression_signatures_post( - configuration: &configuration::Configuration, - get_latest_compression_signatures_post_request: models::GetLatestCompressionSignaturesPostRequest, -) -> Result< - models::GetCompressionSignaturesForAddressPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getLatestCompressionSignatures", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_latest_compression_signatures_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_latest_non_voting_signatures_post( - configuration: &configuration::Configuration, - get_latest_non_voting_signatures_post_request: models::GetLatestNonVotingSignaturesPostRequest, -) -> Result< - models::GetLatestNonVotingSignaturesPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getLatestNonVotingSignatures", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_latest_non_voting_signatures_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_multiple_compressed_account_proofs_post( - configuration: &configuration::Configuration, - get_multiple_compressed_account_proofs_post_request: models::GetMultipleCompressedAccountProofsPostRequest, -) -> Result< - models::GetMultipleCompressedAccountProofsPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getMultipleCompressedAccountProofs", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_multiple_compressed_account_proofs_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_multiple_compressed_account_proofs_v2_post( - configuration: &configuration::Configuration, - get_multiple_compressed_account_proofs_v2_post_request: models::GetMultipleCompressedAccountProofsV2PostRequest, -) -> Result< - models::GetMultipleCompressedAccountProofsV2Post200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getMultipleCompressedAccountProofsV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_multiple_compressed_account_proofs_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_multiple_compressed_accounts_post( - configuration: &configuration::Configuration, - get_multiple_compressed_accounts_post_request: models::GetMultipleCompressedAccountsPostRequest, -) -> Result< - models::GetMultipleCompressedAccountsPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getMultipleCompressedAccounts", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_multiple_compressed_accounts_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_multiple_compressed_accounts_v2_post( - configuration: &configuration::Configuration, - get_multiple_compressed_accounts_v2_post_request: models::GetMultipleCompressedAccountsV2PostRequest, -) -> Result< - models::GetMultipleCompressedAccountsV2Post200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getMultipleCompressedAccountsV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_multiple_compressed_accounts_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_multiple_new_address_proofs_post( - configuration: &configuration::Configuration, - get_multiple_new_address_proofs_post_request: models::GetMultipleNewAddressProofsPostRequest, -) -> Result< - models::GetMultipleNewAddressProofsPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getMultipleNewAddressProofs", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_multiple_new_address_proofs_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_multiple_new_address_proofs_v2_post( - configuration: &configuration::Configuration, - get_multiple_new_address_proofs_v2_post_request: models::GetMultipleNewAddressProofsV2PostRequest, -) -> Result< - models::GetMultipleNewAddressProofsPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getMultipleNewAddressProofsV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_multiple_new_address_proofs_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_queue_info_post( - configuration: &configuration::Configuration, - get_queue_info_post_request: models::GetQueueInfoPostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getQueueInfo", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_queue_info_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_queue_elements_post( - configuration: &configuration::Configuration, - get_queue_elements_post_request: models::GetQueueElementsPostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getQueueElements", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_queue_elements_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_transaction_with_compression_info_post( - configuration: &configuration::Configuration, - get_transaction_with_compression_info_post_request: models::GetTransactionWithCompressionInfoPostRequest, -) -> Result< - models::GetTransactionWithCompressionInfoPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getTransactionWithCompressionInfo", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_transaction_with_compression_info_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_transaction_with_compression_info_v2_post( - configuration: &configuration::Configuration, - get_transaction_with_compression_info_v2_post_request: models::GetTransactionWithCompressionInfoV2PostRequest, -) -> Result< - models::GetTransactionWithCompressionInfoV2Post200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getTransactionWithCompressionInfoV2", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_transaction_with_compression_info_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_validity_proof_post( - configuration: &configuration::Configuration, - get_validity_proof_post_request: models::GetValidityProofPostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getValidityProof", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_validity_proof_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_validity_proof_v2_post( - configuration: &configuration::Configuration, - get_validity_proof_v2_post_request: models::GetValidityProofV2PostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getValidityProofV2", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_validity_proof_v2_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_account_interface_post( - configuration: &configuration::Configuration, - get_account_interface_post_request: models::GetAccountInterfacePostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getAccountInterface", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_account_interface_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_token_account_interface_post( - configuration: &configuration::Configuration, - get_token_account_interface_post_request: models::GetTokenAccountInterfacePostRequest, -) -> Result> -{ - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getTokenAccountInterface", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_token_account_interface_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_ata_interface_post( - configuration: &configuration::Configuration, - get_ata_interface_post_request: models::GetAtaInterfacePostRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/getAtaInterface", local_var_configuration.base_path); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&get_ata_interface_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn get_multiple_account_interfaces_post( - configuration: &configuration::Configuration, - get_multiple_account_interfaces_post_request: models::GetMultipleAccountInterfacesPostRequest, -) -> Result< - models::GetMultipleAccountInterfacesPost200Response, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/getMultipleAccountInterfaces", - local_var_configuration.base_path - ); - let local_var_uri_str = append_api_key(local_var_configuration, &local_var_uri_str); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = - local_var_req_builder.json(&get_multiple_account_interfaces_post_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -fn append_api_key(configuration: &Configuration, uri_str: &str) -> String { - let mut uri_str = uri_str.to_string(); - if let Some(ref api_key) = configuration.api_key { - let prefix = api_key.prefix.clone().unwrap_or("api-key".to_string()); - uri_str = format!("{}?{}={}", uri_str, prefix, api_key.key); - } - uri_str -} diff --git a/sdk-libs/photon-api/src/apis/mod.rs b/sdk-libs/photon-api/src/apis/mod.rs deleted file mode 100644 index fd6f1f3177..0000000000 --- a/sdk-libs/photon-api/src/apis/mod.rs +++ /dev/null @@ -1,96 +0,0 @@ -use std::{error, fmt}; - -#[derive(Debug, Clone)] -pub struct ResponseContent { - pub status: reqwest::StatusCode, - pub content: String, - pub entity: Option, -} - -#[derive(Debug)] -pub enum Error { - Reqwest(reqwest::Error), - Serde(serde_json::Error), - Io(std::io::Error), - ResponseError(ResponseContent), -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let (module, e) = match self { - Error::Reqwest(e) => ("reqwest", e.to_string()), - Error::Serde(e) => ("serde", e.to_string()), - Error::Io(e) => ("IO", e.to_string()), - Error::ResponseError(e) => ("response", format!("status code {}", e.status)), - }; - write!(f, "error in {}: {}", module, e) - } -} - -impl error::Error for Error { - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - match self { - Error::Reqwest(e) => Some(e), - Error::Serde(e) => Some(e), - Error::Io(e) => Some(e), - Error::ResponseError(_) => None, - } - } -} - -impl From for Error { - fn from(e: reqwest::Error) -> Self { - Error::Reqwest(e) - } -} - -impl From for Error { - fn from(e: serde_json::Error) -> Self { - Error::Serde(e) - } -} - -impl From for Error { - fn from(e: std::io::Error) -> Self { - Error::Io(e) - } -} - -pub fn urlencode>(s: T) -> String { - ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() -} - -pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { - if let serde_json::Value::Object(object) = value { - let mut params = vec![]; - - for (key, value) in object { - match value { - serde_json::Value::Object(_) => params.append(&mut parse_deep_object( - &format!("{}[{}]", prefix, key), - value, - )), - serde_json::Value::Array(array) => { - for (i, value) in array.iter().enumerate() { - params.append(&mut parse_deep_object( - &format!("{}[{}][{}]", prefix, key, i), - value, - )); - } - } - serde_json::Value::String(s) => { - params.push((format!("{}[{}]", prefix, key), s.clone())) - } - _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), - } - } - - return params; - } - - unimplemented!("Only objects are supported with style=deepObject") -} - -pub mod default_api; - -pub mod configuration; diff --git a/sdk-libs/photon-api/src/codegen.rs b/sdk-libs/photon-api/src/codegen.rs new file mode 100644 index 0000000000..77c436aae3 --- /dev/null +++ b/sdk-libs/photon-api/src/codegen.rs @@ -0,0 +1,59510 @@ +#[allow(unused_imports)] +pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue}; +#[allow(unused_imports)] +use progenitor_client::{encode_path, ClientHooks, OperationInfo, RequestBuilderExt}; +/// Types used as operation parameters and responses. +#[allow(clippy::all)] +pub mod types { + /// Error types. + pub mod error { + /// Error from a `TryFrom` or `FromStr` implementation. + pub struct ConversionError(::std::borrow::Cow<'static, str>); + impl ::std::error::Error for ConversionError {} + impl ::std::fmt::Display for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Display::fmt(&self.0, f) + } + } + impl ::std::fmt::Debug for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Debug::fmt(&self.0, f) + } + } + impl From<&'static str> for ConversionError { + fn from(value: &'static str) -> Self { + Self(value.into()) + } + } + impl From for ConversionError { + fn from(value: String) -> Self { + Self(value.into()) + } + } + } + ///`Account` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "hash", + /// "lamports", + /// "leafIndex", + /// "owner", + /// "slotCreated", + /// "tree" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "data": { + /// "$ref": "#/components/schemas/AccountData" + /// }, + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "lamports": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "leafIndex": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "seq": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "slotCreated": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "tree": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct Account { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub address: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub data: ::std::option::Option, + pub hash: Hash, + pub lamports: UnsignedInteger, + #[serde(rename = "leafIndex")] + pub leaf_index: UnsignedInteger, + pub owner: SerializablePubkey, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub seq: ::std::option::Option, + #[serde(rename = "slotCreated")] + pub slot_created: UnsignedInteger, + pub tree: SerializablePubkey, + } + impl Account { + pub fn builder() -> builder::Account { + Default::default() + } + } + /**This is currently used internally: +- Internal (state_updates,..) +- GetTransactionWithCompressionInfo (internally) +- GetTransactionWithCompressionInfoV2 (internally) +All endpoints return AccountV2.*/ + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "This is currently used internally:\n- Internal (state_updates,..)\n- GetTransactionWithCompressionInfo (internally)\n- GetTransactionWithCompressionInfoV2 (internally)\nAll endpoints return AccountV2.", + /// "type": "object", + /// "required": [ + /// "inOutputQueue", + /// "nullifiedInTree", + /// "queue", + /// "spent", + /// "treeType" + /// ], + /// "properties": { + /// "inOutputQueue": { + /// "type": "boolean" + /// }, + /// "nullifiedInTree": { + /// "type": "boolean" + /// }, + /// "nullifier": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "nullifierQueueIndex": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "queue": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "spent": { + /// "type": "boolean" + /// }, + /// "treeType": { + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// }, + /// "txHash": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AccountContext { + #[serde(rename = "inOutputQueue")] + pub in_output_queue: bool, + #[serde(rename = "nullifiedInTree")] + pub nullified_in_tree: bool, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub nullifier: ::std::option::Option, + #[serde( + rename = "nullifierQueueIndex", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub nullifier_queue_index: ::std::option::Option, + pub queue: SerializablePubkey, + pub spent: bool, + #[serde(rename = "treeType")] + pub tree_type: u16, + #[serde( + rename = "txHash", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub tx_hash: ::std::option::Option, + } + impl AccountContext { + pub fn builder() -> builder::AccountContext { + Default::default() + } + } + ///`AccountData` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "data", + /// "dataHash", + /// "discriminator" + /// ], + /// "properties": { + /// "data": { + /// "$ref": "#/components/schemas/Base64String" + /// }, + /// "dataHash": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "discriminator": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AccountData { + pub data: Base64String, + #[serde(rename = "dataHash")] + pub data_hash: Hash, + pub discriminator: UnsignedInteger, + } + impl AccountData { + pub fn builder() -> builder::AccountData { + Default::default() + } + } + ///Unified account interface — works for both on-chain and compressed accounts + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Unified account interface — works for both on-chain and compressed accounts", + /// "type": "object", + /// "required": [ + /// "account", + /// "key" + /// ], + /// "properties": { + /// "account": { + /// "$ref": "#/components/schemas/SolanaAccountData" + /// }, + /// "cold": { + /// "$ref": "#/components/schemas/ColdContext" + /// }, + /// "key": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct AccountInterface { + pub account: SolanaAccountData, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cold: ::std::option::Option, + pub key: SerializablePubkey, + } + impl AccountInterface { + pub fn builder() -> builder::AccountInterface { + Default::default() + } + } + ///`AccountList` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "type": "array", + /// "items": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Account" + /// } + /// ] + /// } + /// ] + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AccountList { + pub items: ::std::vec::Vec<::std::option::Option>, + } + impl AccountList { + pub fn builder() -> builder::AccountList { + Default::default() + } + } + ///`AccountListV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "type": "array", + /// "items": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/AccountV2" + /// } + /// ] + /// } + /// ] + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct AccountListV2 { + pub items: ::std::vec::Vec<::std::option::Option>, + } + impl AccountListV2 { + pub fn builder() -> builder::AccountListV2 { + Default::default() + } + } + ///Typed account lookup for batch requests + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Typed account lookup for batch requests", + /// "oneOf": [ + /// { + /// "description": "Generic account/PDA lookup by address", + /// "type": "object", + /// "required": [ + /// "address", + /// "type" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "account" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Token account lookup by address", + /// "type": "object", + /// "required": [ + /// "address", + /// "type" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "token" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(tag = "type", content = "address")] + pub enum AccountLookup { + ///Generic account/PDA lookup by address + #[serde(rename = "account")] + Account(SerializablePubkey), + ///Token account lookup by address + #[serde(rename = "token")] + Token(SerializablePubkey), + } + ///`AccountProofInputs` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "hash", + /// "leafIndex", + /// "merkleContext", + /// "root", + /// "rootIndex" + /// ], + /// "properties": { + /// "hash": { + /// "type": "string" + /// }, + /// "leafIndex": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "merkleContext": { + /// "$ref": "#/components/schemas/MerkleContextV2" + /// }, + /// "root": { + /// "type": "string" + /// }, + /// "rootIndex": { + /// "$ref": "#/components/schemas/RootIndex" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct AccountProofInputs { + pub hash: ::std::string::String, + #[serde(rename = "leafIndex")] + pub leaf_index: u64, + #[serde(rename = "merkleContext")] + pub merkle_context: MerkleContextV2, + pub root: ::std::string::String, + #[serde(rename = "rootIndex")] + pub root_index: RootIndex, + } + impl AccountProofInputs { + pub fn builder() -> builder::AccountProofInputs { + Default::default() + } + } + ///`AccountState` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "initialized", + /// "frozen" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum AccountState { + #[serde(rename = "initialized")] + Initialized, + #[serde(rename = "frozen")] + Frozen, + } + impl ::std::fmt::Display for AccountState { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::Initialized => f.write_str("initialized"), + Self::Frozen => f.write_str("frozen"), + } + } + } + impl ::std::str::FromStr for AccountState { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "initialized" => Ok(Self::Initialized), + "frozen" => Ok(Self::Frozen), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for AccountState { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for AccountState { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for AccountState { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`AccountV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "hash", + /// "lamports", + /// "leafIndex", + /// "merkleContext", + /// "owner", + /// "proveByIndex", + /// "slotCreated" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "data": { + /// "$ref": "#/components/schemas/AccountData" + /// }, + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "lamports": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "leafIndex": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "merkleContext": { + /// "$ref": "#/components/schemas/MerkleContextV2" + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "proveByIndex": { + /// "type": "boolean" + /// }, + /// "seq": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "slotCreated": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AccountV2 { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub address: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub data: ::std::option::Option, + pub hash: Hash, + pub lamports: UnsignedInteger, + #[serde(rename = "leafIndex")] + pub leaf_index: UnsignedInteger, + #[serde(rename = "merkleContext")] + pub merkle_context: MerkleContextV2, + pub owner: SerializablePubkey, + #[serde(rename = "proveByIndex")] + pub prove_by_index: bool, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub seq: ::std::option::Option, + #[serde(rename = "slotCreated")] + pub slot_created: UnsignedInteger, + } + impl AccountV2 { + pub fn builder() -> builder::AccountV2 { + Default::default() + } + } + ///`AccountWithContext` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "account", + /// "context" + /// ], + /// "properties": { + /// "account": { + /// "$ref": "#/components/schemas/Account" + /// }, + /// "context": { + /// "$ref": "#/components/schemas/AccountContext" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AccountWithContext { + pub account: Account, + pub context: AccountContext, + } + impl AccountWithContext { + pub fn builder() -> builder::AccountWithContext { + Default::default() + } + } + ///`AccountWithOptionalTokenData` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "account" + /// ], + /// "properties": { + /// "account": { + /// "$ref": "#/components/schemas/Account" + /// }, + /// "optionalTokenData": { + /// "$ref": "#/components/schemas/TokenData" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AccountWithOptionalTokenData { + pub account: Account, + #[serde( + rename = "optionalTokenData", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub optional_token_data: ::std::option::Option, + } + impl AccountWithOptionalTokenData { + pub fn builder() -> builder::AccountWithOptionalTokenData { + Default::default() + } + } + ///`AccountWithOptionalTokenDataV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "account" + /// ], + /// "properties": { + /// "account": { + /// "$ref": "#/components/schemas/AccountV2" + /// }, + /// "optionalTokenData": { + /// "$ref": "#/components/schemas/TokenData" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AccountWithOptionalTokenDataV2 { + pub account: AccountV2, + #[serde( + rename = "optionalTokenData", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub optional_token_data: ::std::option::Option, + } + impl AccountWithOptionalTokenDataV2 { + pub fn builder() -> builder::AccountWithOptionalTokenDataV2 { + Default::default() + } + } + ///`AddressListWithTrees` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AddressWithTree" + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(transparent)] + pub struct AddressListWithTrees(pub ::std::vec::Vec); + impl ::std::ops::Deref for AddressListWithTrees { + type Target = ::std::vec::Vec; + fn deref(&self) -> &::std::vec::Vec { + &self.0 + } + } + impl ::std::convert::From + for ::std::vec::Vec { + fn from(value: AddressListWithTrees) -> Self { + value.0 + } + } + impl ::std::convert::From<::std::vec::Vec> + for AddressListWithTrees { + fn from(value: ::std::vec::Vec) -> Self { + Self(value) + } + } + ///`AddressProofInputs` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "address", + /// "merkleContext", + /// "root", + /// "rootIndex" + /// ], + /// "properties": { + /// "address": { + /// "type": "string" + /// }, + /// "merkleContext": { + /// "$ref": "#/components/schemas/MerkleContextV2" + /// }, + /// "root": { + /// "type": "string" + /// }, + /// "rootIndex": { + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct AddressProofInputs { + pub address: ::std::string::String, + #[serde(rename = "merkleContext")] + pub merkle_context: MerkleContextV2, + pub root: ::std::string::String, + #[serde(rename = "rootIndex")] + pub root_index: u16, + } + impl AddressProofInputs { + pub fn builder() -> builder::AddressProofInputs { + Default::default() + } + } + ///`AddressQueueData` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "addresses", + /// "initialRoot", + /// "leavesHashChains", + /// "lowElementIndices", + /// "lowElementNextIndices", + /// "lowElementNextValues", + /// "lowElementValues", + /// "nodes", + /// "queueIndices", + /// "rootSeq", + /// "startIndex", + /// "subtrees" + /// ], + /// "properties": { + /// "addresses": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "initialRoot": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "leavesHashChains": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "lowElementIndices": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "lowElementNextIndices": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "lowElementNextValues": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "lowElementValues": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "nodes": { + /// "description": "Deduplicated tree nodes - clients reconstruct proofs from these using low_element_indices", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Node" + /// } + /// }, + /// "queueIndices": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "rootSeq": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "startIndex": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "subtrees": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AddressQueueData { + pub addresses: ::std::vec::Vec, + #[serde(rename = "initialRoot")] + pub initial_root: Hash, + #[serde(rename = "leavesHashChains")] + pub leaves_hash_chains: ::std::vec::Vec, + #[serde(rename = "lowElementIndices")] + pub low_element_indices: ::std::vec::Vec, + #[serde(rename = "lowElementNextIndices")] + pub low_element_next_indices: ::std::vec::Vec, + #[serde(rename = "lowElementNextValues")] + pub low_element_next_values: ::std::vec::Vec, + #[serde(rename = "lowElementValues")] + pub low_element_values: ::std::vec::Vec, + ///Deduplicated tree nodes - clients reconstruct proofs from these using low_element_indices + pub nodes: ::std::vec::Vec, + #[serde(rename = "queueIndices")] + pub queue_indices: ::std::vec::Vec, + #[serde(rename = "rootSeq")] + pub root_seq: u64, + #[serde(rename = "startIndex")] + pub start_index: u64, + pub subtrees: ::std::vec::Vec, + } + impl AddressQueueData { + pub fn builder() -> builder::AddressQueueData { + Default::default() + } + } + ///`AddressWithTree` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "address", + /// "tree" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "tree": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct AddressWithTree { + pub address: SerializablePubkey, + pub tree: SerializablePubkey, + } + impl AddressWithTree { + pub fn builder() -> builder::AddressWithTree { + Default::default() + } + } + ///A base 58 encoded string. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A base 58 encoded string.", + /// "default": "3J98t1WpEZ73CNm", + /// "examples": [ + /// "3J98t1WpEZ73CNm" + /// ], + /// "type": "string" + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + #[serde(transparent)] + pub struct Base58String(pub ::std::string::String); + impl ::std::ops::Deref for Base58String { + type Target = ::std::string::String; + fn deref(&self) -> &::std::string::String { + &self.0 + } + } + impl ::std::convert::From for ::std::string::String { + fn from(value: Base58String) -> Self { + value.0 + } + } + impl ::std::convert::From<::std::string::String> for Base58String { + fn from(value: ::std::string::String) -> Self { + Self(value) + } + } + impl ::std::str::FromStr for Base58String { + type Err = ::std::convert::Infallible; + fn from_str(value: &str) -> ::std::result::Result { + Ok(Self(value.to_string())) + } + } + impl ::std::fmt::Display for Base58String { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + self.0.fmt(f) + } + } + ///A base 64 encoded string. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A base 64 encoded string.", + /// "default": "SGVsbG8sIFdvcmxkIQ==", + /// "examples": [ + /// "SGVsbG8sIFdvcmxkIQ==" + /// ], + /// "type": "string" + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + #[serde(transparent)] + pub struct Base64String(pub ::std::string::String); + impl ::std::ops::Deref for Base64String { + type Target = ::std::string::String; + fn deref(&self) -> &::std::string::String { + &self.0 + } + } + impl ::std::convert::From for ::std::string::String { + fn from(value: Base64String) -> Self { + value.0 + } + } + impl ::std::convert::From<::std::string::String> for Base64String { + fn from(value: ::std::string::String) -> Self { + Self(value) + } + } + impl ::std::str::FromStr for Base64String { + type Err = ::std::convert::Infallible; + fn from_str(value: &str) -> ::std::result::Result { + Ok(Self(value.to_string())) + } + } + impl ::std::fmt::Display for Base64String { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + self.0.fmt(f) + } + } + ///`ClosedAccountV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "account", + /// "nullifier", + /// "txHash" + /// ], + /// "properties": { + /// "account": { + /// "$ref": "#/components/schemas/AccountV2" + /// }, + /// "nullifier": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "txHash": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct ClosedAccountV2 { + pub account: AccountV2, + pub nullifier: Hash, + #[serde(rename = "txHash")] + pub tx_hash: Hash, + } + impl ClosedAccountV2 { + pub fn builder() -> builder::ClosedAccountV2 { + Default::default() + } + } + ///`ClosedAccountWithOptionalTokenDataV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "account" + /// ], + /// "properties": { + /// "account": { + /// "$ref": "#/components/schemas/ClosedAccountV2" + /// }, + /// "optionalTokenData": { + /// "$ref": "#/components/schemas/TokenData" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct ClosedAccountWithOptionalTokenDataV2 { + pub account: ClosedAccountV2, + #[serde( + rename = "optionalTokenData", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub optional_token_data: ::std::option::Option, + } + impl ClosedAccountWithOptionalTokenDataV2 { + pub fn builder() -> builder::ClosedAccountWithOptionalTokenDataV2 { + Default::default() + } + } + ///Compressed account context — present when account is in compressed state + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Compressed account context — present when account is in compressed state", + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "data", + /// "hash", + /// "leafIndex", + /// "treeInfo", + /// "type" + /// ], + /// "properties": { + /// "data": { + /// "$ref": "#/components/schemas/ColdData" + /// }, + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "leafIndex": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "treeInfo": { + /// "$ref": "#/components/schemas/TreeInfo" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "account" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "data", + /// "hash", + /// "leafIndex", + /// "treeInfo", + /// "type" + /// ], + /// "properties": { + /// "data": { + /// "$ref": "#/components/schemas/ColdData" + /// }, + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "leafIndex": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "treeInfo": { + /// "$ref": "#/components/schemas/TreeInfo" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "token" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(tag = "type")] + pub enum ColdContext { + #[serde(rename = "account")] + Account { + data: ColdData, + hash: Hash, + #[serde(rename = "leafIndex")] + leaf_index: UnsignedInteger, + #[serde(rename = "treeInfo")] + tree_info: TreeInfo, + }, + #[serde(rename = "token")] + Token { + data: ColdData, + hash: Hash, + #[serde(rename = "leafIndex")] + leaf_index: UnsignedInteger, + #[serde(rename = "treeInfo")] + tree_info: TreeInfo, + }, + } + ///`ColdData` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "data", + /// "discriminator" + /// ], + /// "properties": { + /// "data": { + /// "$ref": "#/components/schemas/Base64String" + /// }, + /// "discriminator": { + /// "type": "array", + /// "items": { + /// "type": "integer" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct ColdData { + pub data: Base64String, + pub discriminator: ::std::vec::Vec, + } + impl ColdData { + pub fn builder() -> builder::ColdData { + Default::default() + } + } + ///`CompressedProof` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "a", + /// "b", + /// "c" + /// ], + /// "properties": { + /// "a": { + /// "type": "array", + /// "items": { + /// "type": "integer" + /// } + /// }, + /// "b": { + /// "type": "array", + /// "items": { + /// "type": "integer" + /// } + /// }, + /// "c": { + /// "type": "array", + /// "items": { + /// "type": "integer" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct CompressedProof { + pub a: ::std::vec::Vec, + pub b: ::std::vec::Vec, + pub c: ::std::vec::Vec, + } + impl CompressedProof { + pub fn builder() -> builder::CompressedProof { + Default::default() + } + } + ///`CompressedProofWithContext` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "compressedProof", + /// "leafIndices", + /// "leaves", + /// "merkleTrees", + /// "rootIndices", + /// "roots" + /// ], + /// "properties": { + /// "compressedProof": { + /// "$ref": "#/components/schemas/CompressedProof" + /// }, + /// "leafIndices": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint32", + /// "minimum": 0.0 + /// } + /// }, + /// "leaves": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "merkleTrees": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "rootIndices": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "roots": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct CompressedProofWithContext { + #[serde(rename = "compressedProof")] + pub compressed_proof: CompressedProof, + #[serde(rename = "leafIndices")] + pub leaf_indices: ::std::vec::Vec, + pub leaves: ::std::vec::Vec<::std::string::String>, + #[serde(rename = "merkleTrees")] + pub merkle_trees: ::std::vec::Vec<::std::string::String>, + #[serde(rename = "rootIndices")] + pub root_indices: ::std::vec::Vec, + pub roots: ::std::vec::Vec<::std::string::String>, + } + impl CompressedProofWithContext { + pub fn builder() -> builder::CompressedProofWithContext { + Default::default() + } + } + ///`CompressedProofWithContextV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "accounts", + /// "addresses" + /// ], + /// "properties": { + /// "accounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountProofInputs" + /// } + /// }, + /// "addresses": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AddressProofInputs" + /// } + /// }, + /// "compressedProof": { + /// "$ref": "#/components/schemas/CompressedProof" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct CompressedProofWithContextV2 { + pub accounts: ::std::vec::Vec, + pub addresses: ::std::vec::Vec, + #[serde( + rename = "compressedProof", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub compressed_proof: ::std::option::Option, + } + impl CompressedProofWithContextV2 { + pub fn builder() -> builder::CompressedProofWithContextV2 { + Default::default() + } + } + ///`CompressionInfoV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "closedAccounts", + /// "openedAccounts" + /// ], + /// "properties": { + /// "closedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ClosedAccountWithOptionalTokenDataV2" + /// } + /// }, + /// "openedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenDataV2" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct CompressionInfoV2 { + #[serde(rename = "closedAccounts")] + pub closed_accounts: ::std::vec::Vec, + #[serde(rename = "openedAccounts")] + pub opened_accounts: ::std::vec::Vec, + } + impl CompressionInfoV2 { + pub fn builder() -> builder::CompressionInfoV2 { + Default::default() + } + } + ///`Context` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "slot" + /// ], + /// "properties": { + /// "slot": { + /// "default": 100, + /// "examples": [ + /// 100 + /// ], + /// "type": "integer", + /// "format": "uint64" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct Context { + pub slot: u64, + } + impl Context { + pub fn builder() -> builder::Context { + Default::default() + } + } + ///`DataSlice` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "length", + /// "offset" + /// ], + /// "properties": { + /// "length": { + /// "type": "integer", + /// "minimum": 0.0 + /// }, + /// "offset": { + /// "type": "integer", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct DataSlice { + pub length: u64, + pub offset: u64, + } + impl DataSlice { + pub fn builder() -> builder::DataSlice { + Default::default() + } + } + ///`FilterSelector` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "memcmp": { + /// "$ref": "#/components/schemas/Memcmp" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct FilterSelector { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub memcmp: ::std::option::Option, + } + impl ::std::default::Default for FilterSelector { + fn default() -> Self { + Self { memcmp: Default::default() } + } + } + impl FilterSelector { + pub fn builder() -> builder::FilterSelector { + Default::default() + } + } + ///`GetCompressedAccountProofResponseValue` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "hash", + /// "leafIndex", + /// "merkleTree", + /// "proof", + /// "root", + /// "rootSeq" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "leafIndex": { + /// "type": "integer", + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "merkleTree": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "proof": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "root": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "rootSeq": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct GetCompressedAccountProofResponseValue { + pub hash: Hash, + #[serde(rename = "leafIndex")] + pub leaf_index: u32, + #[serde(rename = "merkleTree")] + pub merkle_tree: SerializablePubkey, + pub proof: ::std::vec::Vec, + pub root: Hash, + #[serde(rename = "rootSeq")] + pub root_seq: u64, + } + impl GetCompressedAccountProofResponseValue { + pub fn builder() -> builder::GetCompressedAccountProofResponseValue { + Default::default() + } + } + ///`GetCompressedAccountProofResponseValueV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "hash", + /// "leafIndex", + /// "proof", + /// "proveByIndex", + /// "root", + /// "rootSeq", + /// "treeContext" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "leafIndex": { + /// "type": "integer", + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "proof": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "proveByIndex": { + /// "type": "boolean" + /// }, + /// "root": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "rootSeq": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "treeContext": { + /// "$ref": "#/components/schemas/TreeContextInfo" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct GetCompressedAccountProofResponseValueV2 { + pub hash: Hash, + #[serde(rename = "leafIndex")] + pub leaf_index: u32, + pub proof: ::std::vec::Vec, + #[serde(rename = "proveByIndex")] + pub prove_by_index: bool, + pub root: Hash, + #[serde(rename = "rootSeq")] + pub root_seq: u64, + #[serde(rename = "treeContext")] + pub tree_context: TreeContextInfo, + } + impl GetCompressedAccountProofResponseValueV2 { + pub fn builder() -> builder::GetCompressedAccountProofResponseValueV2 { + Default::default() + } + } + ///A 32-byte hash represented as a base58 string. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A 32-byte hash represented as a base58 string.", + /// "examples": [ + /// "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP" + /// ], + /// "type": "string" + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + #[serde(transparent)] + pub struct Hash(pub ::std::string::String); + impl ::std::ops::Deref for Hash { + type Target = ::std::string::String; + fn deref(&self) -> &::std::string::String { + &self.0 + } + } + impl ::std::convert::From for ::std::string::String { + fn from(value: Hash) -> Self { + value.0 + } + } + impl ::std::convert::From<::std::string::String> for Hash { + fn from(value: ::std::string::String) -> Self { + Self(value) + } + } + impl ::std::str::FromStr for Hash { + type Err = ::std::convert::Infallible; + fn from_str(value: &str) -> ::std::result::Result { + Ok(Self(value.to_string())) + } + } + impl ::std::fmt::Display for Hash { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + self.0.fmt(f) + } + } + ///`InputQueueData` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "accountHashes", + /// "firstQueueIndex", + /// "leafIndices", + /// "leaves", + /// "leavesHashChains", + /// "nullifiers", + /// "txHashes" + /// ], + /// "properties": { + /// "accountHashes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "firstQueueIndex": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "leafIndices": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "leaves": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "leavesHashChains": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "nullifiers": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "txHashes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct InputQueueData { + #[serde(rename = "accountHashes")] + pub account_hashes: ::std::vec::Vec, + #[serde(rename = "firstQueueIndex")] + pub first_queue_index: u64, + #[serde(rename = "leafIndices")] + pub leaf_indices: ::std::vec::Vec, + pub leaves: ::std::vec::Vec, + #[serde(rename = "leavesHashChains")] + pub leaves_hash_chains: ::std::vec::Vec, + pub nullifiers: ::std::vec::Vec, + #[serde(rename = "txHashes")] + pub tx_hashes: ::std::vec::Vec, + } + impl InputQueueData { + pub fn builder() -> builder::InputQueueData { + Default::default() + } + } + ///Heterogeneous result type for batch lookups + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Heterogeneous result type for batch lookups", + /// "oneOf": [ + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/AccountInterface" + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "account" + /// ] + /// } + /// } + /// } + /// ] + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/TokenAccountInterface" + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "token" + /// ] + /// } + /// } + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(untagged)] + pub enum InterfaceResult { + Variant0 { + account: SolanaAccountData, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + cold: ::std::option::Option, + key: SerializablePubkey, + #[serde(rename = "type")] + type_: InterfaceResultVariant0Type, + }, + Variant1 { + account: SolanaAccountData, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + cold: ::std::option::Option, + key: SerializablePubkey, + #[serde(rename = "tokenData")] + token_data: TokenData, + #[serde(rename = "type")] + type_: InterfaceResultVariant1Type, + }, + } + ///`InterfaceResultVariant0Type` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum InterfaceResultVariant0Type { + #[serde(rename = "account")] + Account, + } + impl ::std::fmt::Display for InterfaceResultVariant0Type { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::Account => f.write_str("account"), + } + } + } + impl ::std::str::FromStr for InterfaceResultVariant0Type { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "account" => Ok(Self::Account), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for InterfaceResultVariant0Type { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for InterfaceResultVariant0Type { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for InterfaceResultVariant0Type { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`InterfaceResultVariant1Type` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "token" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum InterfaceResultVariant1Type { + #[serde(rename = "token")] + Token, + } + impl ::std::fmt::Display for InterfaceResultVariant1Type { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::Token => f.write_str("token"), + } + } + } + impl ::std::str::FromStr for InterfaceResultVariant1Type { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "token" => Ok(Self::Token), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for InterfaceResultVariant1Type { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for InterfaceResultVariant1Type { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for InterfaceResultVariant1Type { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`Limit` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(transparent)] + pub struct Limit(pub u64); + impl ::std::ops::Deref for Limit { + type Target = u64; + fn deref(&self) -> &u64 { + &self.0 + } + } + impl ::std::convert::From for u64 { + fn from(value: Limit) -> Self { + value.0 + } + } + impl ::std::convert::From for Limit { + fn from(value: u64) -> Self { + Self(value) + } + } + impl ::std::str::FromStr for Limit { + type Err = ::Err; + fn from_str(value: &str) -> ::std::result::Result { + Ok(Self(value.parse()?)) + } + } + impl ::std::convert::TryFrom<&str> for Limit { + type Error = ::Err; + fn try_from(value: &str) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom for Limit { + type Error = ::Err; + fn try_from(value: String) -> ::std::result::Result { + value.parse() + } + } + impl ::std::fmt::Display for Limit { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + self.0.fmt(f) + } + } + ///`Memcmp` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "bytes", + /// "offset" + /// ], + /// "properties": { + /// "bytes": { + /// "$ref": "#/components/schemas/Base58String" + /// }, + /// "offset": { + /// "type": "integer", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct Memcmp { + pub bytes: Base58String, + pub offset: u64, + } + impl Memcmp { + pub fn builder() -> builder::Memcmp { + Default::default() + } + } + ///`MerkleContextV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "queue", + /// "tree", + /// "treeType" + /// ], + /// "properties": { + /// "cpiContext": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "nextTreeContext": { + /// "$ref": "#/components/schemas/TreeContextInfo" + /// }, + /// "queue": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "tree": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "treeType": { + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct MerkleContextV2 { + #[serde( + rename = "cpiContext", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub cpi_context: ::std::option::Option, + #[serde( + rename = "nextTreeContext", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub next_tree_context: ::std::option::Option, + pub queue: SerializablePubkey, + pub tree: SerializablePubkey, + #[serde(rename = "treeType")] + pub tree_type: u16, + } + impl MerkleContextV2 { + pub fn builder() -> builder::MerkleContextV2 { + Default::default() + } + } + ///`MerkleContextWithNewAddressProof` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "address", + /// "higherRangeAddress", + /// "lowElementLeafIndex", + /// "lowerRangeAddress", + /// "merkleTree", + /// "nextIndex", + /// "proof", + /// "root", + /// "rootSeq" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "higherRangeAddress": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "lowElementLeafIndex": { + /// "type": "integer", + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "lowerRangeAddress": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "merkleTree": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "nextIndex": { + /// "type": "integer", + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "proof": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "root": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "rootSeq": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct MerkleContextWithNewAddressProof { + pub address: SerializablePubkey, + #[serde(rename = "higherRangeAddress")] + pub higher_range_address: SerializablePubkey, + #[serde(rename = "lowElementLeafIndex")] + pub low_element_leaf_index: u32, + #[serde(rename = "lowerRangeAddress")] + pub lower_range_address: SerializablePubkey, + #[serde(rename = "merkleTree")] + pub merkle_tree: SerializablePubkey, + #[serde(rename = "nextIndex")] + pub next_index: u32, + pub proof: ::std::vec::Vec, + pub root: Hash, + #[serde(rename = "rootSeq")] + pub root_seq: u64, + } + impl MerkleContextWithNewAddressProof { + pub fn builder() -> builder::MerkleContextWithNewAddressProof { + Default::default() + } + } + ///A tree node with its encoded index and hash + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A tree node with its encoded index and hash", + /// "type": "object", + /// "required": [ + /// "hash", + /// "index" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "index": { + /// "description": "Encoded node index: (level << 56) | position", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct Node { + pub hash: Hash, + ///Encoded node index: (level << 56) | position + pub index: u64, + } + impl Node { + pub fn builder() -> builder::Node { + Default::default() + } + } + ///`OutputQueueData` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "accountHashes", + /// "firstQueueIndex", + /// "leafIndices", + /// "leaves", + /// "leavesHashChains", + /// "nextIndex" + /// ], + /// "properties": { + /// "accountHashes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "firstQueueIndex": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "leafIndices": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "leaves": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "leavesHashChains": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "nextIndex": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct OutputQueueData { + #[serde(rename = "accountHashes")] + pub account_hashes: ::std::vec::Vec, + #[serde(rename = "firstQueueIndex")] + pub first_queue_index: u64, + #[serde(rename = "leafIndices")] + pub leaf_indices: ::std::vec::Vec, + pub leaves: ::std::vec::Vec, + #[serde(rename = "leavesHashChains")] + pub leaves_hash_chains: ::std::vec::Vec, + #[serde(rename = "nextIndex")] + pub next_index: u64, + } + impl OutputQueueData { + pub fn builder() -> builder::OutputQueueData { + Default::default() + } + } + ///`OwnerBalance` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "balance", + /// "owner" + /// ], + /// "properties": { + /// "balance": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct OwnerBalance { + pub balance: UnsignedInteger, + pub owner: SerializablePubkey, + } + impl OwnerBalance { + pub fn builder() -> builder::OwnerBalance { + Default::default() + } + } + ///`OwnerBalanceList` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "cursor": { + /// "$ref": "#/components/schemas/Base58String" + /// }, + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/OwnerBalance" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct OwnerBalanceList { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub items: ::std::vec::Vec, + } + impl OwnerBalanceList { + pub fn builder() -> builder::OwnerBalanceList { + Default::default() + } + } + ///`OwnerBalancesResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/OwnerBalanceList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct OwnerBalancesResponse { + pub context: Context, + pub value: OwnerBalanceList, + } + impl OwnerBalancesResponse { + pub fn builder() -> builder::OwnerBalancesResponse { + Default::default() + } + } + ///`PaginatedAccountList` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "cursor": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Account" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PaginatedAccountList { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub items: ::std::vec::Vec, + } + impl PaginatedAccountList { + pub fn builder() -> builder::PaginatedAccountList { + Default::default() + } + } + ///`PaginatedAccountListV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "cursor": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountV2" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PaginatedAccountListV2 { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub items: ::std::vec::Vec, + } + impl PaginatedAccountListV2 { + pub fn builder() -> builder::PaginatedAccountListV2 { + Default::default() + } + } + ///`PaginatedSignatureInfoList` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SignatureInfo" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PaginatedSignatureInfoList { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option<::std::string::String>, + pub items: ::std::vec::Vec, + } + impl PaginatedSignatureInfoList { + pub fn builder() -> builder::PaginatedSignatureInfoList { + Default::default() + } + } + ///`PostGetAccountInterfaceBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getAccountInterface" + /// ] + /// }, + /// "params": { + /// "description": "Request for getAccountInterface", + /// "type": "object", + /// "required": [ + /// "address" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAccountInterfaceBody { + ///An ID to identify the request. + pub id: PostGetAccountInterfaceBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetAccountInterfaceBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetAccountInterfaceBodyMethod, + pub params: PostGetAccountInterfaceBodyParams, + } + impl PostGetAccountInterfaceBody { + pub fn builder() -> builder::PostGetAccountInterfaceBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfaceBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetAccountInterfaceBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfaceBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfaceBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetAccountInterfaceBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfaceBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getAccountInterface" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfaceBodyMethod { + #[serde(rename = "getAccountInterface")] + GetAccountInterface, + } + impl ::std::fmt::Display for PostGetAccountInterfaceBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetAccountInterface => f.write_str("getAccountInterface"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfaceBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getAccountInterface" => Ok(Self::GetAccountInterface), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for getAccountInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for getAccountInterface", + /// "type": "object", + /// "required": [ + /// "address" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetAccountInterfaceBodyParams { + pub address: SerializablePubkey, + } + impl PostGetAccountInterfaceBodyParams { + pub fn builder() -> builder::PostGetAccountInterfaceBodyParams { + Default::default() + } + } + ///`PostGetAccountInterfaceResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "Response for getAccountInterface", + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/AccountInterface" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAccountInterfaceResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetAccountInterfaceResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetAccountInterfaceResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetAccountInterfaceResponse { + pub fn builder() -> builder::PostGetAccountInterfaceResponse { + Default::default() + } + } + ///`PostGetAccountInterfaceResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAccountInterfaceResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetAccountInterfaceResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetAccountInterfaceResponseError { + pub fn builder() -> builder::PostGetAccountInterfaceResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfaceResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetAccountInterfaceResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfaceResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfaceResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetAccountInterfaceResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfaceResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Response for getAccountInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Response for getAccountInterface", + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/AccountInterface" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAccountInterfaceResponseResult { + pub context: Context, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub value: ::std::option::Option, + } + impl PostGetAccountInterfaceResponseResult { + pub fn builder() -> builder::PostGetAccountInterfaceResponseResult { + Default::default() + } + } + ///`PostGetAccountInterfacesBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getAccountInterfaces" + /// ] + /// }, + /// "params": { + /// "description": "Request for getAccountInterfaces (batch)", + /// "type": "object", + /// "required": [ + /// "addresses" + /// ], + /// "properties": { + /// "addresses": { + /// "description": "List of account addresses to look up (max 100)", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAccountInterfacesBody { + ///An ID to identify the request. + pub id: PostGetAccountInterfacesBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetAccountInterfacesBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetAccountInterfacesBodyMethod, + pub params: PostGetAccountInterfacesBodyParams, + } + impl PostGetAccountInterfacesBody { + pub fn builder() -> builder::PostGetAccountInterfacesBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfacesBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetAccountInterfacesBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfacesBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfacesBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetAccountInterfacesBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfacesBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getAccountInterfaces" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfacesBodyMethod { + #[serde(rename = "getAccountInterfaces")] + GetAccountInterfaces, + } + impl ::std::fmt::Display for PostGetAccountInterfacesBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetAccountInterfaces => f.write_str("getAccountInterfaces"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfacesBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getAccountInterfaces" => Ok(Self::GetAccountInterfaces), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for getAccountInterfaces (batch) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for getAccountInterfaces (batch)", + /// "type": "object", + /// "required": [ + /// "addresses" + /// ], + /// "properties": { + /// "addresses": { + /// "description": "List of account addresses to look up (max 100)", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetAccountInterfacesBodyParams { + ///List of account addresses to look up (max 100) + pub addresses: ::std::vec::Vec, + } + impl PostGetAccountInterfacesBodyParams { + pub fn builder() -> builder::PostGetAccountInterfacesBodyParams { + Default::default() + } + } + ///`PostGetAccountInterfacesResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "Response for getAccountInterfaces (batch)", + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/AccountInterface" + /// } + /// ] + /// } + /// ] + /// } + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAccountInterfacesResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetAccountInterfacesResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetAccountInterfacesResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetAccountInterfacesResponse { + pub fn builder() -> builder::PostGetAccountInterfacesResponse { + Default::default() + } + } + ///`PostGetAccountInterfacesResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAccountInterfacesResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetAccountInterfacesResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetAccountInterfacesResponseError { + pub fn builder() -> builder::PostGetAccountInterfacesResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfacesResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetAccountInterfacesResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfacesResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAccountInterfacesResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetAccountInterfacesResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetAccountInterfacesResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Response for getAccountInterfaces (batch) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Response for getAccountInterfaces (batch)", + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/AccountInterface" + /// } + /// ] + /// } + /// ] + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAccountInterfacesResponseResult { + pub context: Context, + pub value: ::std::vec::Vec<::std::option::Option>, + } + impl PostGetAccountInterfacesResponseResult { + pub fn builder() -> builder::PostGetAccountInterfacesResponseResult { + Default::default() + } + } + ///`PostGetAtaInterfaceBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getAtaInterface" + /// ] + /// }, + /// "params": { + /// "description": "Request for getAtaInterface", + /// "type": "object", + /// "required": [ + /// "mint", + /// "owner" + /// ], + /// "properties": { + /// "mint": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAtaInterfaceBody { + ///An ID to identify the request. + pub id: PostGetAtaInterfaceBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetAtaInterfaceBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetAtaInterfaceBodyMethod, + pub params: PostGetAtaInterfaceBodyParams, + } + impl PostGetAtaInterfaceBody { + pub fn builder() -> builder::PostGetAtaInterfaceBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAtaInterfaceBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetAtaInterfaceBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetAtaInterfaceBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAtaInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for PostGetAtaInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetAtaInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAtaInterfaceBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetAtaInterfaceBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetAtaInterfaceBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAtaInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAtaInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAtaInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getAtaInterface" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAtaInterfaceBodyMethod { + #[serde(rename = "getAtaInterface")] + GetAtaInterface, + } + impl ::std::fmt::Display for PostGetAtaInterfaceBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetAtaInterface => f.write_str("getAtaInterface"), + } + } + } + impl ::std::str::FromStr for PostGetAtaInterfaceBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getAtaInterface" => Ok(Self::GetAtaInterface), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAtaInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAtaInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAtaInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for getAtaInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for getAtaInterface", + /// "type": "object", + /// "required": [ + /// "mint", + /// "owner" + /// ], + /// "properties": { + /// "mint": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetAtaInterfaceBodyParams { + pub mint: SerializablePubkey, + pub owner: SerializablePubkey, + } + impl PostGetAtaInterfaceBodyParams { + pub fn builder() -> builder::PostGetAtaInterfaceBodyParams { + Default::default() + } + } + ///`PostGetAtaInterfaceResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "Response for getAtaInterface", + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountInterface" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAtaInterfaceResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetAtaInterfaceResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetAtaInterfaceResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetAtaInterfaceResponse { + pub fn builder() -> builder::PostGetAtaInterfaceResponse { + Default::default() + } + } + ///`PostGetAtaInterfaceResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAtaInterfaceResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetAtaInterfaceResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetAtaInterfaceResponseError { + pub fn builder() -> builder::PostGetAtaInterfaceResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAtaInterfaceResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetAtaInterfaceResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetAtaInterfaceResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAtaInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAtaInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAtaInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetAtaInterfaceResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetAtaInterfaceResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetAtaInterfaceResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetAtaInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetAtaInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetAtaInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Response for getAtaInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Response for getAtaInterface", + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountInterface" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetAtaInterfaceResponseResult { + pub context: Context, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub value: ::std::option::Option, + } + impl PostGetAtaInterfaceResponseResult { + pub fn builder() -> builder::PostGetAtaInterfaceResponseResult { + Default::default() + } + } + ///`PostGetCompressedAccountBalanceBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountBalance" + /// ] + /// }, + /// "params": { + /// "description": "Request for compressed account data", + /// "default": { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// }, + /// "examples": [ + /// { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "address": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "hash": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountBalanceBody { + ///An ID to identify the request. + pub id: PostGetCompressedAccountBalanceBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountBalanceBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedAccountBalanceBodyMethod, + pub params: PostGetCompressedAccountBalanceBodyParams, + } + impl PostGetCompressedAccountBalanceBody { + pub fn builder() -> builder::PostGetCompressedAccountBalanceBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountBalanceBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountBalanceBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountBalanceBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBalanceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountBalanceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountBalanceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountBalanceBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountBalanceBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountBalanceBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBalanceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountBalanceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountBalanceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountBalance" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountBalanceBodyMethod { + #[serde(rename = "getCompressedAccountBalance")] + GetCompressedAccountBalance, + } + impl ::std::fmt::Display for PostGetCompressedAccountBalanceBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedAccountBalance => { + f.write_str("getCompressedAccountBalance") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountBalanceBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedAccountBalance" => Ok(Self::GetCompressedAccountBalance), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBalanceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountBalanceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountBalanceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for compressed account data + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for compressed account data", + /// "default": { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// }, + /// "examples": [ + /// { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "address": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "hash": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountBalanceBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub address: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub hash: ::std::option::Option, + } + impl ::std::default::Default for PostGetCompressedAccountBalanceBodyParams { + fn default() -> Self { + PostGetCompressedAccountBalanceBodyParams { + address: ::std::option::Option::None, + hash: ::std::option::Option::Some( + Hash("11111111111111111111111111111111".to_string()), + ), + } + } + } + impl PostGetCompressedAccountBalanceBodyParams { + pub fn builder() -> builder::PostGetCompressedAccountBalanceBodyParams { + Default::default() + } + } + ///`PostGetCompressedAccountBalanceResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountBalanceResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetCompressedAccountBalanceResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountBalanceResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetCompressedAccountBalanceResponse { + pub fn builder() -> builder::PostGetCompressedAccountBalanceResponse { + Default::default() + } + } + ///`PostGetCompressedAccountBalanceResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountBalanceResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedAccountBalanceResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedAccountBalanceResponseError { + pub fn builder() -> builder::PostGetCompressedAccountBalanceResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountBalanceResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountBalanceResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountBalanceResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBalanceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountBalanceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountBalanceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountBalanceResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountBalanceResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountBalanceResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedAccountBalanceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountBalanceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountBalanceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountBalanceResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountBalanceResponseResult { + pub context: Context, + pub value: UnsignedInteger, + } + impl PostGetCompressedAccountBalanceResponseResult { + pub fn builder() -> builder::PostGetCompressedAccountBalanceResponseResult { + Default::default() + } + } + ///`PostGetCompressedAccountBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccount" + /// ] + /// }, + /// "params": { + /// "description": "Request for compressed account data", + /// "default": { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// }, + /// "examples": [ + /// { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "address": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "hash": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountBody { + ///An ID to identify the request. + pub id: PostGetCompressedAccountBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedAccountBodyMethod, + pub params: PostGetCompressedAccountBodyParams, + } + impl PostGetCompressedAccountBody { + pub fn builder() -> builder::PostGetCompressedAccountBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccount" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountBodyMethod { + #[serde(rename = "getCompressedAccount")] + GetCompressedAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedAccount => f.write_str("getCompressedAccount"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedAccount" => Ok(Self::GetCompressedAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for compressed account data + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for compressed account data", + /// "default": { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// }, + /// "examples": [ + /// { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "address": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "hash": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub address: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub hash: ::std::option::Option, + } + impl ::std::default::Default for PostGetCompressedAccountBodyParams { + fn default() -> Self { + PostGetCompressedAccountBodyParams { + address: ::std::option::Option::None, + hash: ::std::option::Option::Some( + Hash("11111111111111111111111111111111".to_string()), + ), + } + } + } + impl PostGetCompressedAccountBodyParams { + pub fn builder() -> builder::PostGetCompressedAccountBodyParams { + Default::default() + } + } + ///`PostGetCompressedAccountProofBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountProof" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "hash" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountProofBody { + ///An ID to identify the request. + pub id: PostGetCompressedAccountProofBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountProofBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedAccountProofBodyMethod, + pub params: PostGetCompressedAccountProofBodyParams, + } + impl PostGetCompressedAccountProofBody { + pub fn builder() -> builder::PostGetCompressedAccountProofBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountProof" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofBodyMethod { + #[serde(rename = "getCompressedAccountProof")] + GetCompressedAccountProof, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedAccountProof => { + f.write_str("getCompressedAccountProof") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedAccountProof" => Ok(Self::GetCompressedAccountProof), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountProofBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "hash" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountProofBodyParams { + pub hash: Hash, + } + impl PostGetCompressedAccountProofBodyParams { + pub fn builder() -> builder::PostGetCompressedAccountProofBodyParams { + Default::default() + } + } + ///`PostGetCompressedAccountProofResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/GetCompressedAccountProofResponseValue" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountProofResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetCompressedAccountProofResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountProofResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetCompressedAccountProofResponse { + pub fn builder() -> builder::PostGetCompressedAccountProofResponse { + Default::default() + } + } + ///`PostGetCompressedAccountProofResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountProofResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedAccountProofResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedAccountProofResponseError { + pub fn builder() -> builder::PostGetCompressedAccountProofResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountProofResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/GetCompressedAccountProofResponseValue" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountProofResponseResult { + pub context: Context, + pub value: GetCompressedAccountProofResponseValue, + } + impl PostGetCompressedAccountProofResponseResult { + pub fn builder() -> builder::PostGetCompressedAccountProofResponseResult { + Default::default() + } + } + ///`PostGetCompressedAccountProofV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountProofV2" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "hash" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountProofV2Body { + ///An ID to identify the request. + pub id: PostGetCompressedAccountProofV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountProofV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedAccountProofV2BodyMethod, + pub params: PostGetCompressedAccountProofV2BodyParams, + } + impl PostGetCompressedAccountProofV2Body { + pub fn builder() -> builder::PostGetCompressedAccountProofV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountProofV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofV2BodyMethod { + #[serde(rename = "getCompressedAccountProofV2")] + GetCompressedAccountProofV2, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedAccountProofV2 => { + f.write_str("getCompressedAccountProofV2") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedAccountProofV2" => Ok(Self::GetCompressedAccountProofV2), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountProofV2BodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "hash" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountProofV2BodyParams { + pub hash: Hash, + } + impl PostGetCompressedAccountProofV2BodyParams { + pub fn builder() -> builder::PostGetCompressedAccountProofV2BodyParams { + Default::default() + } + } + ///`PostGetCompressedAccountProofV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/GetCompressedAccountProofResponseValueV2" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountProofV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetCompressedAccountProofV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountProofV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetCompressedAccountProofV2Response { + pub fn builder() -> builder::PostGetCompressedAccountProofV2Response { + Default::default() + } + } + ///`PostGetCompressedAccountProofV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountProofV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedAccountProofV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedAccountProofV2ResponseError { + pub fn builder() -> builder::PostGetCompressedAccountProofV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountProofV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountProofV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountProofV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedAccountProofV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountProofV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountProofV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountProofV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/GetCompressedAccountProofResponseValueV2" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountProofV2ResponseResult { + pub context: Context, + pub value: GetCompressedAccountProofResponseValueV2, + } + impl PostGetCompressedAccountProofV2ResponseResult { + pub fn builder() -> builder::PostGetCompressedAccountProofV2ResponseResult { + Default::default() + } + } + ///`PostGetCompressedAccountResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Account" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetCompressedAccountResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetCompressedAccountResponse { + pub fn builder() -> builder::PostGetCompressedAccountResponse { + Default::default() + } + } + ///`PostGetCompressedAccountResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedAccountResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedAccountResponseError { + pub fn builder() -> builder::PostGetCompressedAccountResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Account" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountResponseResult { + pub context: Context, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub value: ::std::option::Option, + } + impl PostGetCompressedAccountResponseResult { + pub fn builder() -> builder::PostGetCompressedAccountResponseResult { + Default::default() + } + } + ///`PostGetCompressedAccountV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountV2" + /// ] + /// }, + /// "params": { + /// "description": "Request for compressed account data", + /// "default": { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// }, + /// "examples": [ + /// { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "address": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "hash": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountV2Body { + ///An ID to identify the request. + pub id: PostGetCompressedAccountV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedAccountV2BodyMethod, + pub params: PostGetCompressedAccountV2BodyParams, + } + impl PostGetCompressedAccountV2Body { + pub fn builder() -> builder::PostGetCompressedAccountV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountV2BodyMethod { + #[serde(rename = "getCompressedAccountV2")] + GetCompressedAccountV2, + } + impl ::std::fmt::Display for PostGetCompressedAccountV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedAccountV2 => f.write_str("getCompressedAccountV2"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedAccountV2" => Ok(Self::GetCompressedAccountV2), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for compressed account data + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for compressed account data", + /// "default": { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// }, + /// "examples": [ + /// { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "address": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "hash": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountV2BodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub address: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub hash: ::std::option::Option, + } + impl ::std::default::Default for PostGetCompressedAccountV2BodyParams { + fn default() -> Self { + PostGetCompressedAccountV2BodyParams { + address: ::std::option::Option::None, + hash: ::std::option::Option::Some( + Hash("11111111111111111111111111111111".to_string()), + ), + } + } + } + impl PostGetCompressedAccountV2BodyParams { + pub fn builder() -> builder::PostGetCompressedAccountV2BodyParams { + Default::default() + } + } + ///`PostGetCompressedAccountV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/AccountV2" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetCompressedAccountV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetCompressedAccountV2Response { + pub fn builder() -> builder::PostGetCompressedAccountV2Response { + Default::default() + } + } + ///`PostGetCompressedAccountV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedAccountV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedAccountV2ResponseError { + pub fn builder() -> builder::PostGetCompressedAccountV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/AccountV2" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountV2ResponseResult { + pub context: Context, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub value: ::std::option::Option, + } + impl PostGetCompressedAccountV2ResponseResult { + pub fn builder() -> builder::PostGetCompressedAccountV2ResponseResult { + Default::default() + } + } + ///`PostGetCompressedAccountsByOwnerBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountsByOwner" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// }, + /// "dataSlice": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DataSlice" + /// } + /// ] + /// } + /// ] + /// }, + /// "filters": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FilterSelector" + /// } + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerBody { + ///An ID to identify the request. + pub id: PostGetCompressedAccountsByOwnerBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountsByOwnerBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedAccountsByOwnerBodyMethod, + pub params: PostGetCompressedAccountsByOwnerBodyParams, + } + impl PostGetCompressedAccountsByOwnerBody { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountsByOwner" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerBodyMethod { + #[serde(rename = "getCompressedAccountsByOwner")] + GetCompressedAccountsByOwner, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedAccountsByOwner => { + f.write_str("getCompressedAccountsByOwner") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedAccountsByOwner" => Ok(Self::GetCompressedAccountsByOwner), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountsByOwnerBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// }, + /// "dataSlice": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DataSlice" + /// } + /// ] + /// } + /// ] + /// }, + /// "filters": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FilterSelector" + /// } + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountsByOwnerBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + #[serde( + rename = "dataSlice", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub data_slice: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] + pub filters: ::std::vec::Vec, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + pub owner: SerializablePubkey, + } + impl PostGetCompressedAccountsByOwnerBodyParams { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerBodyParams { + Default::default() + } + } + ///`PostGetCompressedAccountsByOwnerResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedAccountList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetCompressedAccountsByOwnerResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountsByOwnerResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedAccountsByOwnerResponseResult, + >, + } + impl PostGetCompressedAccountsByOwnerResponse { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerResponse { + Default::default() + } + } + ///`PostGetCompressedAccountsByOwnerResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedAccountsByOwnerResponseError { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedAccountsByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountsByOwnerResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedAccountList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountsByOwnerResponseResult { + pub context: Context, + pub value: PaginatedAccountList, + } + impl PostGetCompressedAccountsByOwnerResponseResult { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerResponseResult { + Default::default() + } + } + ///`PostGetCompressedAccountsByOwnerV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountsByOwnerV2" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// }, + /// "dataSlice": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DataSlice" + /// } + /// ] + /// } + /// ] + /// }, + /// "filters": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FilterSelector" + /// } + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerV2Body { + ///An ID to identify the request. + pub id: PostGetCompressedAccountsByOwnerV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountsByOwnerV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedAccountsByOwnerV2BodyMethod, + pub params: PostGetCompressedAccountsByOwnerV2BodyParams, + } + impl PostGetCompressedAccountsByOwnerV2Body { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedAccountsByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedAccountsByOwnerV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerV2BodyMethod { + #[serde(rename = "getCompressedAccountsByOwnerV2")] + GetCompressedAccountsByOwnerV2, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedAccountsByOwnerV2 => { + f.write_str("getCompressedAccountsByOwnerV2") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedAccountsByOwnerV2" => { + Ok(Self::GetCompressedAccountsByOwnerV2) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountsByOwnerV2BodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// }, + /// "dataSlice": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DataSlice" + /// } + /// ] + /// } + /// ] + /// }, + /// "filters": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FilterSelector" + /// } + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountsByOwnerV2BodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + #[serde( + rename = "dataSlice", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub data_slice: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] + pub filters: ::std::vec::Vec, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + pub owner: SerializablePubkey, + } + impl PostGetCompressedAccountsByOwnerV2BodyParams { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2BodyParams { + Default::default() + } + } + ///`PostGetCompressedAccountsByOwnerV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedAccountListV2" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressedAccountsByOwnerV2ResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressedAccountsByOwnerV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedAccountsByOwnerV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedAccountsByOwnerV2ResponseResult, + >, + } + impl PostGetCompressedAccountsByOwnerV2Response { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2Response { + Default::default() + } + } + ///`PostGetCompressedAccountsByOwnerV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedAccountsByOwnerV2ResponseError { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedAccountsByOwnerV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedAccountsByOwnerV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedAccountListV2" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedAccountsByOwnerV2ResponseResult { + pub context: Context, + pub value: PaginatedAccountListV2, + } + impl PostGetCompressedAccountsByOwnerV2ResponseResult { + pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2ResponseResult { + Default::default() + } + } + ///`PostGetCompressedBalanceByOwnerBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedBalanceByOwner" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerBody { + ///An ID to identify the request. + pub id: PostGetCompressedBalanceByOwnerBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedBalanceByOwnerBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedBalanceByOwnerBodyMethod, + pub params: PostGetCompressedBalanceByOwnerBodyParams, + } + impl PostGetCompressedBalanceByOwnerBody { + pub fn builder() -> builder::PostGetCompressedBalanceByOwnerBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedBalanceByOwnerBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedBalanceByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedBalanceByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedBalanceByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedBalanceByOwnerBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedBalanceByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedBalanceByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedBalanceByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedBalanceByOwner" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedBalanceByOwnerBodyMethod { + #[serde(rename = "getCompressedBalanceByOwner")] + GetCompressedBalanceByOwner, + } + impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedBalanceByOwner => { + f.write_str("getCompressedBalanceByOwner") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedBalanceByOwner" => Ok(Self::GetCompressedBalanceByOwner), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedBalanceByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedBalanceByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedBalanceByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedBalanceByOwnerBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerBodyParams { + pub owner: SerializablePubkey, + } + impl PostGetCompressedBalanceByOwnerBodyParams { + pub fn builder() -> builder::PostGetCompressedBalanceByOwnerBodyParams { + Default::default() + } + } + ///`PostGetCompressedBalanceByOwnerResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetCompressedBalanceByOwnerResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedBalanceByOwnerResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetCompressedBalanceByOwnerResponse { + pub fn builder() -> builder::PostGetCompressedBalanceByOwnerResponse { + Default::default() + } + } + ///`PostGetCompressedBalanceByOwnerResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedBalanceByOwnerResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedBalanceByOwnerResponseError { + pub fn builder() -> builder::PostGetCompressedBalanceByOwnerResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedBalanceByOwnerResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedBalanceByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedBalanceByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedBalanceByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedBalanceByOwnerResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedBalanceByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedBalanceByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedBalanceByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedBalanceByOwnerResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedBalanceByOwnerResponseResult { + pub context: Context, + pub value: UnsignedInteger, + } + impl PostGetCompressedBalanceByOwnerResponseResult { + pub fn builder() -> builder::PostGetCompressedBalanceByOwnerResponseResult { + Default::default() + } + } + ///`PostGetCompressedMintTokenHoldersBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedMintTokenHolders" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "mint" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedMintTokenHoldersBody { + ///An ID to identify the request. + pub id: PostGetCompressedMintTokenHoldersBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedMintTokenHoldersBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedMintTokenHoldersBodyMethod, + pub params: PostGetCompressedMintTokenHoldersBodyParams, + } + impl PostGetCompressedMintTokenHoldersBody { + pub fn builder() -> builder::PostGetCompressedMintTokenHoldersBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedMintTokenHoldersBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedMintTokenHoldersBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedMintTokenHoldersBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedMintTokenHoldersBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedMintTokenHoldersBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedMintTokenHoldersBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedMintTokenHoldersBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedMintTokenHoldersBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedMintTokenHolders" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedMintTokenHoldersBodyMethod { + #[serde(rename = "getCompressedMintTokenHolders")] + GetCompressedMintTokenHolders, + } + impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedMintTokenHolders => { + f.write_str("getCompressedMintTokenHolders") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedMintTokenHolders" => { + Ok(Self::GetCompressedMintTokenHolders) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedMintTokenHoldersBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedMintTokenHoldersBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedMintTokenHoldersBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedMintTokenHoldersBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "mint" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedMintTokenHoldersBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + pub mint: SerializablePubkey, + } + impl PostGetCompressedMintTokenHoldersBodyParams { + pub fn builder() -> builder::PostGetCompressedMintTokenHoldersBodyParams { + Default::default() + } + } + ///`PostGetCompressedMintTokenHoldersResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/OwnerBalanceList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedMintTokenHoldersResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetCompressedMintTokenHoldersResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedMintTokenHoldersResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedMintTokenHoldersResponseResult, + >, + } + impl PostGetCompressedMintTokenHoldersResponse { + pub fn builder() -> builder::PostGetCompressedMintTokenHoldersResponse { + Default::default() + } + } + ///`PostGetCompressedMintTokenHoldersResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedMintTokenHoldersResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedMintTokenHoldersResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedMintTokenHoldersResponseError { + pub fn builder() -> builder::PostGetCompressedMintTokenHoldersResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedMintTokenHoldersResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedMintTokenHoldersResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedMintTokenHoldersResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedMintTokenHoldersResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedMintTokenHoldersResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedMintTokenHoldersResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedMintTokenHoldersResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedMintTokenHoldersResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedMintTokenHoldersResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/OwnerBalanceList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedMintTokenHoldersResponseResult { + pub context: Context, + pub value: OwnerBalanceList, + } + impl PostGetCompressedMintTokenHoldersResponseResult { + pub fn builder() -> builder::PostGetCompressedMintTokenHoldersResponseResult { + Default::default() + } + } + ///`PostGetCompressedTokenAccountBalanceBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountBalance" + /// ] + /// }, + /// "params": { + /// "description": "Request for compressed account data", + /// "default": { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// }, + /// "examples": [ + /// { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "address": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "hash": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountBalanceBody { + ///An ID to identify the request. + pub id: PostGetCompressedTokenAccountBalanceBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountBalanceBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedTokenAccountBalanceBodyMethod, + pub params: PostGetCompressedTokenAccountBalanceBodyParams, + } + impl PostGetCompressedTokenAccountBalanceBody { + pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountBalanceBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedTokenAccountBalanceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountBalanceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountBalanceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountBalanceBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountBalanceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountBalanceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountBalanceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountBalance" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountBalanceBodyMethod { + #[serde(rename = "getCompressedTokenAccountBalance")] + GetCompressedTokenAccountBalance, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedTokenAccountBalance => { + f.write_str("getCompressedTokenAccountBalance") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedTokenAccountBalance" => { + Ok(Self::GetCompressedTokenAccountBalance) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountBalanceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountBalanceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountBalanceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for compressed account data + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for compressed account data", + /// "default": { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// }, + /// "examples": [ + /// { + /// "address": null, + /// "hash": "11111111111111111111111111111111" + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "address": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "hash": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Hash" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountBalanceBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub address: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub hash: ::std::option::Option, + } + impl ::std::default::Default for PostGetCompressedTokenAccountBalanceBodyParams { + fn default() -> Self { + PostGetCompressedTokenAccountBalanceBodyParams { + address: ::std::option::Option::None, + hash: ::std::option::Option::Some( + Hash("11111111111111111111111111111111".to_string()), + ), + } + } + } + impl PostGetCompressedTokenAccountBalanceBodyParams { + pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceBodyParams { + Default::default() + } + } + ///`PostGetCompressedTokenAccountBalanceResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountBalance" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountBalanceResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressedTokenAccountBalanceResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressedTokenAccountBalanceResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountBalanceResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedTokenAccountBalanceResponseResult, + >, + } + impl PostGetCompressedTokenAccountBalanceResponse { + pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceResponse { + Default::default() + } + } + ///`PostGetCompressedTokenAccountBalanceResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountBalanceResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedTokenAccountBalanceResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedTokenAccountBalanceResponseError { + pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountBalanceResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountBalanceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountBalanceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountBalanceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountBalanceResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountBalanceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountBalanceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountBalanceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountBalanceResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountBalance" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountBalanceResponseResult { + pub context: Context, + pub value: TokenAccountBalance, + } + impl PostGetCompressedTokenAccountBalanceResponseResult { + pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceResponseResult { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByDelegateBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountsByDelegate" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "delegate" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "delegate": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateBody { + ///An ID to identify the request. + pub id: PostGetCompressedTokenAccountsByDelegateBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountsByDelegateBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedTokenAccountsByDelegateBodyMethod, + pub params: PostGetCompressedTokenAccountsByDelegateBodyParams, + } + impl PostGetCompressedTokenAccountsByDelegateBody { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountsByDelegate" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateBodyMethod { + #[serde(rename = "getCompressedTokenAccountsByDelegate")] + GetCompressedTokenAccountsByDelegate, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedTokenAccountsByDelegate => { + f.write_str("getCompressedTokenAccountsByDelegate") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedTokenAccountsByDelegate" => { + Ok(Self::GetCompressedTokenAccountsByDelegate) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountsByDelegateBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "delegate" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "delegate": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountsByDelegateBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub delegate: SerializablePubkey, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub mint: ::std::option::Option, + } + impl PostGetCompressedTokenAccountsByDelegateBodyParams { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateBodyParams { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByDelegateResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressedTokenAccountsByDelegateResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressedTokenAccountsByDelegateResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountsByDelegateResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedTokenAccountsByDelegateResponseResult, + >, + } + impl PostGetCompressedTokenAccountsByDelegateResponse { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateResponse { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByDelegateResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateResponseError { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display + for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr + for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountsByDelegateResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountsByDelegateResponseResult { + pub context: Context, + pub value: TokenAccountList, + } + impl PostGetCompressedTokenAccountsByDelegateResponseResult { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateResponseResult { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByDelegateV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountsByDelegateV2" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "delegate" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "delegate": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateV2Body { + ///An ID to identify the request. + pub id: PostGetCompressedTokenAccountsByDelegateV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedTokenAccountsByDelegateV2BodyMethod, + pub params: PostGetCompressedTokenAccountsByDelegateV2BodyParams, + } + impl PostGetCompressedTokenAccountsByDelegateV2Body { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountsByDelegateV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateV2BodyMethod { + #[serde(rename = "getCompressedTokenAccountsByDelegateV2")] + GetCompressedTokenAccountsByDelegateV2, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedTokenAccountsByDelegateV2 => { + f.write_str("getCompressedTokenAccountsByDelegateV2") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedTokenAccountsByDelegateV2" => { + Ok(Self::GetCompressedTokenAccountsByDelegateV2) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountsByDelegateV2BodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "delegate" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "delegate": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountsByDelegateV2BodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub delegate: SerializablePubkey, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub mint: ::std::option::Option, + } + impl PostGetCompressedTokenAccountsByDelegateV2BodyParams { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2BodyParams { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByDelegateV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountListV2" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressedTokenAccountsByDelegateV2ResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressedTokenAccountsByDelegateV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedTokenAccountsByDelegateV2ResponseResult, + >, + } + impl PostGetCompressedTokenAccountsByDelegateV2Response { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2Response { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByDelegateV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateV2ResponseError { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display + for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr + for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountsByDelegateV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountListV2" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountsByDelegateV2ResponseResult { + pub context: Context, + pub value: TokenAccountListV2, + } + impl PostGetCompressedTokenAccountsByDelegateV2ResponseResult { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2ResponseResult { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByOwnerBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountsByOwner" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerBody { + ///An ID to identify the request. + pub id: PostGetCompressedTokenAccountsByOwnerBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountsByOwnerBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedTokenAccountsByOwnerBodyMethod, + pub params: PostGetCompressedTokenAccountsByOwnerBodyParams, + } + impl PostGetCompressedTokenAccountsByOwnerBody { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedTokenAccountsByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountsByOwner" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerBodyMethod { + #[serde(rename = "getCompressedTokenAccountsByOwner")] + GetCompressedTokenAccountsByOwner, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedTokenAccountsByOwner => { + f.write_str("getCompressedTokenAccountsByOwner") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedTokenAccountsByOwner" => { + Ok(Self::GetCompressedTokenAccountsByOwner) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountsByOwnerBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountsByOwnerBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub mint: ::std::option::Option, + pub owner: SerializablePubkey, + } + impl PostGetCompressedTokenAccountsByOwnerBodyParams { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerBodyParams { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByOwnerResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressedTokenAccountsByOwnerResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressedTokenAccountsByOwnerResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountsByOwnerResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedTokenAccountsByOwnerResponseResult, + >, + } + impl PostGetCompressedTokenAccountsByOwnerResponse { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerResponse { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByOwnerResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedTokenAccountsByOwnerResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerResponseError { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountsByOwnerResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountsByOwnerResponseResult { + pub context: Context, + pub value: TokenAccountList, + } + impl PostGetCompressedTokenAccountsByOwnerResponseResult { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerResponseResult { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByOwnerV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountsByOwnerV2" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerV2Body { + ///An ID to identify the request. + pub id: PostGetCompressedTokenAccountsByOwnerV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedTokenAccountsByOwnerV2BodyMethod, + pub params: PostGetCompressedTokenAccountsByOwnerV2BodyParams, + } + impl PostGetCompressedTokenAccountsByOwnerV2Body { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenAccountsByOwnerV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerV2BodyMethod { + #[serde(rename = "getCompressedTokenAccountsByOwnerV2")] + GetCompressedTokenAccountsByOwnerV2, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedTokenAccountsByOwnerV2 => { + f.write_str("getCompressedTokenAccountsByOwnerV2") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedTokenAccountsByOwnerV2" => { + Ok(Self::GetCompressedTokenAccountsByOwnerV2) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountsByOwnerV2BodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountsByOwnerV2BodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub mint: ::std::option::Option, + pub owner: SerializablePubkey, + } + impl PostGetCompressedTokenAccountsByOwnerV2BodyParams { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2BodyParams { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByOwnerV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountListV2" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressedTokenAccountsByOwnerV2ResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressedTokenAccountsByOwnerV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedTokenAccountsByOwnerV2ResponseResult, + >, + } + impl PostGetCompressedTokenAccountsByOwnerV2Response { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2Response { + Default::default() + } + } + ///`PostGetCompressedTokenAccountsByOwnerV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByOwnerV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerV2ResponseError { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenAccountsByOwnerV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountListV2" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenAccountsByOwnerV2ResponseResult { + pub context: Context, + pub value: TokenAccountListV2, + } + impl PostGetCompressedTokenAccountsByOwnerV2ResponseResult { + pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2ResponseResult { + Default::default() + } + } + ///`PostGetCompressedTokenBalancesByOwnerBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenBalancesByOwner" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerBody { + ///An ID to identify the request. + pub id: PostGetCompressedTokenBalancesByOwnerBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenBalancesByOwnerBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedTokenBalancesByOwnerBodyMethod, + pub params: PostGetCompressedTokenBalancesByOwnerBodyParams, + } + impl PostGetCompressedTokenBalancesByOwnerBody { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressedTokenBalancesByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenBalancesByOwner" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerBodyMethod { + #[serde(rename = "getCompressedTokenBalancesByOwner")] + GetCompressedTokenBalancesByOwner, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedTokenBalancesByOwner => { + f.write_str("getCompressedTokenBalancesByOwner") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedTokenBalancesByOwner" => { + Ok(Self::GetCompressedTokenBalancesByOwner) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenBalancesByOwnerBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenBalancesByOwnerBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub mint: ::std::option::Option, + pub owner: SerializablePubkey, + } + impl PostGetCompressedTokenBalancesByOwnerBodyParams { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerBodyParams { + Default::default() + } + } + ///`PostGetCompressedTokenBalancesByOwnerResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenBalanceList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressedTokenBalancesByOwnerResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressedTokenBalancesByOwnerResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenBalancesByOwnerResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedTokenBalancesByOwnerResponseResult, + >, + } + impl PostGetCompressedTokenBalancesByOwnerResponse { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerResponse { + Default::default() + } + } + ///`PostGetCompressedTokenBalancesByOwnerResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressedTokenBalancesByOwnerResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerResponseError { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenBalancesByOwnerResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenBalanceList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenBalancesByOwnerResponseResult { + pub context: Context, + pub value: TokenBalanceList, + } + impl PostGetCompressedTokenBalancesByOwnerResponseResult { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerResponseResult { + Default::default() + } + } + ///`PostGetCompressedTokenBalancesByOwnerV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenBalancesByOwnerV2" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerV2Body { + ///An ID to identify the request. + pub id: PostGetCompressedTokenBalancesByOwnerV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressedTokenBalancesByOwnerV2BodyMethod, + pub params: PostGetCompressedTokenBalancesByOwnerV2BodyParams, + } + impl PostGetCompressedTokenBalancesByOwnerV2Body { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressedTokenBalancesByOwnerV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerV2BodyMethod { + #[serde(rename = "getCompressedTokenBalancesByOwnerV2")] + GetCompressedTokenBalancesByOwnerV2, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressedTokenBalancesByOwnerV2 => { + f.write_str("getCompressedTokenBalancesByOwnerV2") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressedTokenBalancesByOwnerV2" => { + Ok(Self::GetCompressedTokenBalancesByOwnerV2) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenBalancesByOwnerV2BodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Base58String" + /// } + /// ] + /// } + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "mint": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenBalancesByOwnerV2BodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub mint: ::std::option::Option, + pub owner: SerializablePubkey, + } + impl PostGetCompressedTokenBalancesByOwnerV2BodyParams { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2BodyParams { + Default::default() + } + } + ///`PostGetCompressedTokenBalancesByOwnerV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenBalanceListV2" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressedTokenBalancesByOwnerV2ResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressedTokenBalancesByOwnerV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressedTokenBalancesByOwnerV2ResponseResult, + >, + } + impl PostGetCompressedTokenBalancesByOwnerV2Response { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2Response { + Default::default() + } + } + ///`PostGetCompressedTokenBalancesByOwnerV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetCompressedTokenBalancesByOwnerV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerV2ResponseError { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressedTokenBalancesByOwnerV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenBalanceListV2" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressedTokenBalancesByOwnerV2ResponseResult { + pub context: Context, + pub value: TokenBalanceListV2, + } + impl PostGetCompressedTokenBalancesByOwnerV2ResponseResult { + pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2ResponseResult { + Default::default() + } + } + ///`PostGetCompressionSignaturesForAccountBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressionSignaturesForAccount" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "hash" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountBody { + ///An ID to identify the request. + pub id: PostGetCompressionSignaturesForAccountBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressionSignaturesForAccountBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressionSignaturesForAccountBodyMethod, + pub params: PostGetCompressionSignaturesForAccountBodyParams, + } + impl PostGetCompressionSignaturesForAccountBody { + pub fn builder() -> builder::PostGetCompressionSignaturesForAccountBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAccountBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressionSignaturesForAccountBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAccountBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAccountBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAccountBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForAccountBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAccountBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAccountBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressionSignaturesForAccount" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAccountBodyMethod { + #[serde(rename = "getCompressionSignaturesForAccount")] + GetCompressionSignaturesForAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressionSignaturesForAccount => { + f.write_str("getCompressionSignaturesForAccount") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressionSignaturesForAccount" => { + Ok(Self::GetCompressionSignaturesForAccount) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForAccountBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAccountBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAccountBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressionSignaturesForAccountBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "hash" + /// ], + /// "properties": { + /// "hash": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountBodyParams { + pub hash: Hash, + } + impl PostGetCompressionSignaturesForAccountBodyParams { + pub fn builder() -> builder::PostGetCompressionSignaturesForAccountBodyParams { + Default::default() + } + } + ///`PostGetCompressionSignaturesForAccountResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/SignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressionSignaturesForAccountResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressionSignaturesForAccountResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressionSignaturesForAccountResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressionSignaturesForAccountResponseResult, + >, + } + impl PostGetCompressionSignaturesForAccountResponse { + pub fn builder() -> builder::PostGetCompressionSignaturesForAccountResponse { + Default::default() + } + } + ///`PostGetCompressionSignaturesForAccountResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForAccountResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressionSignaturesForAccountResponseError { + pub fn builder() -> builder::PostGetCompressionSignaturesForAccountResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAccountResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForAccountResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAccountResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAccountResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAccountResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForAccountResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAccountResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAccountResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressionSignaturesForAccountResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/SignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressionSignaturesForAccountResponseResult { + pub context: Context, + pub value: SignatureInfoList, + } + impl PostGetCompressionSignaturesForAccountResponseResult { + pub fn builder() -> builder::PostGetCompressionSignaturesForAccountResponseResult { + Default::default() + } + } + ///`PostGetCompressionSignaturesForAddressBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressionSignaturesForAddress" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "address" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForAddressBody { + ///An ID to identify the request. + pub id: PostGetCompressionSignaturesForAddressBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressionSignaturesForAddressBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressionSignaturesForAddressBodyMethod, + pub params: PostGetCompressionSignaturesForAddressBodyParams, + } + impl PostGetCompressionSignaturesForAddressBody { + pub fn builder() -> builder::PostGetCompressionSignaturesForAddressBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAddressBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressionSignaturesForAddressBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAddressBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAddressBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAddressBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForAddressBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAddressBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAddressBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressionSignaturesForAddress" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAddressBodyMethod { + #[serde(rename = "getCompressionSignaturesForAddress")] + GetCompressionSignaturesForAddress, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressionSignaturesForAddress => { + f.write_str("getCompressionSignaturesForAddress") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressionSignaturesForAddress" => { + Ok(Self::GetCompressionSignaturesForAddress) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForAddressBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAddressBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAddressBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressionSignaturesForAddressBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "address" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressionSignaturesForAddressBodyParams { + pub address: SerializablePubkey, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option<::std::string::String>, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + } + impl PostGetCompressionSignaturesForAddressBodyParams { + pub fn builder() -> builder::PostGetCompressionSignaturesForAddressBodyParams { + Default::default() + } + } + ///`PostGetCompressionSignaturesForAddressResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedSignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForAddressResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressionSignaturesForAddressResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressionSignaturesForAddressResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressionSignaturesForAddressResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressionSignaturesForAddressResponseResult, + >, + } + impl PostGetCompressionSignaturesForAddressResponse { + pub fn builder() -> builder::PostGetCompressionSignaturesForAddressResponse { + Default::default() + } + } + ///`PostGetCompressionSignaturesForAddressResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForAddressResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForAddressResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressionSignaturesForAddressResponseError { + pub fn builder() -> builder::PostGetCompressionSignaturesForAddressResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAddressResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForAddressResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAddressResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAddressResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForAddressResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForAddressResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForAddressResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForAddressResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressionSignaturesForAddressResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedSignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressionSignaturesForAddressResponseResult { + pub context: Context, + pub value: PaginatedSignatureInfoList, + } + impl PostGetCompressionSignaturesForAddressResponseResult { + pub fn builder() -> builder::PostGetCompressionSignaturesForAddressResponseResult { + Default::default() + } + } + ///`PostGetCompressionSignaturesForOwnerBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressionSignaturesForOwner" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForOwnerBody { + ///An ID to identify the request. + pub id: PostGetCompressionSignaturesForOwnerBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressionSignaturesForOwnerBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressionSignaturesForOwnerBodyMethod, + pub params: PostGetCompressionSignaturesForOwnerBodyParams, + } + impl PostGetCompressionSignaturesForOwnerBody { + pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForOwnerBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetCompressionSignaturesForOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForOwnerBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressionSignaturesForOwner" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForOwnerBodyMethod { + #[serde(rename = "getCompressionSignaturesForOwner")] + GetCompressionSignaturesForOwner, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressionSignaturesForOwner => { + f.write_str("getCompressionSignaturesForOwner") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressionSignaturesForOwner" => { + Ok(Self::GetCompressionSignaturesForOwner) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressionSignaturesForOwnerBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressionSignaturesForOwnerBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option<::std::string::String>, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + pub owner: SerializablePubkey, + } + impl PostGetCompressionSignaturesForOwnerBodyParams { + pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerBodyParams { + Default::default() + } + } + ///`PostGetCompressionSignaturesForOwnerResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedSignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForOwnerResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressionSignaturesForOwnerResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressionSignaturesForOwnerResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressionSignaturesForOwnerResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressionSignaturesForOwnerResponseResult, + >, + } + impl PostGetCompressionSignaturesForOwnerResponse { + pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerResponse { + Default::default() + } + } + ///`PostGetCompressionSignaturesForOwnerResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForOwnerResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetCompressionSignaturesForOwnerResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressionSignaturesForOwnerResponseError { + pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForOwnerResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForOwnerResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressionSignaturesForOwnerResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedSignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressionSignaturesForOwnerResponseResult { + pub context: Context, + pub value: PaginatedSignatureInfoList, + } + impl PostGetCompressionSignaturesForOwnerResponseResult { + pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerResponseResult { + Default::default() + } + } + ///`PostGetCompressionSignaturesForTokenOwnerBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressionSignaturesForTokenOwner" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForTokenOwnerBody { + ///An ID to identify the request. + pub id: PostGetCompressionSignaturesForTokenOwnerBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetCompressionSignaturesForTokenOwnerBodyMethod, + pub params: PostGetCompressionSignaturesForTokenOwnerBodyParams, + } + impl PostGetCompressionSignaturesForTokenOwnerBody { + pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForTokenOwnerBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForTokenOwnerBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForTokenOwnerBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForTokenOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getCompressionSignaturesForTokenOwner" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForTokenOwnerBodyMethod { + #[serde(rename = "getCompressionSignaturesForTokenOwner")] + GetCompressionSignaturesForTokenOwner, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForTokenOwnerBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetCompressionSignaturesForTokenOwner => { + f.write_str("getCompressionSignaturesForTokenOwner") + } + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForTokenOwnerBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getCompressionSignaturesForTokenOwner" => { + Ok(Self::GetCompressionSignaturesForTokenOwner) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForTokenOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressionSignaturesForTokenOwnerBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "owner" + /// ], + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressionSignaturesForTokenOwnerBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option<::std::string::String>, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + pub owner: SerializablePubkey, + } + impl PostGetCompressionSignaturesForTokenOwnerBodyParams { + pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerBodyParams { + Default::default() + } + } + ///`PostGetCompressionSignaturesForTokenOwnerResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedSignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForTokenOwnerResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetCompressionSignaturesForTokenOwnerResponseError, + >, + ///An ID to identify the response. + pub id: PostGetCompressionSignaturesForTokenOwnerResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetCompressionSignaturesForTokenOwnerResponseResult, + >, + } + impl PostGetCompressionSignaturesForTokenOwnerResponse { + pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerResponse { + Default::default() + } + } + ///`PostGetCompressionSignaturesForTokenOwnerResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetCompressionSignaturesForTokenOwnerResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForTokenOwnerResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetCompressionSignaturesForTokenOwnerResponseError { + pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForTokenOwnerResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetCompressionSignaturesForTokenOwnerResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetCompressionSignaturesForTokenOwnerResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForTokenOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display + for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr + for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetCompressionSignaturesForTokenOwnerResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedSignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetCompressionSignaturesForTokenOwnerResponseResult { + pub context: Context, + pub value: PaginatedSignatureInfoList, + } + impl PostGetCompressionSignaturesForTokenOwnerResponseResult { + pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerResponseResult { + Default::default() + } + } + ///`PostGetIndexerHealthBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getIndexerHealth" + /// ] + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetIndexerHealthBody { + ///An ID to identify the request. + pub id: PostGetIndexerHealthBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetIndexerHealthBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetIndexerHealthBodyMethod, + } + impl PostGetIndexerHealthBody { + pub fn builder() -> builder::PostGetIndexerHealthBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerHealthBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetIndexerHealthBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerHealthBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for PostGetIndexerHealthBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetIndexerHealthBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerHealthBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetIndexerHealthBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerHealthBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerHealthBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerHealthBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getIndexerHealth" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerHealthBodyMethod { + #[serde(rename = "getIndexerHealth")] + GetIndexerHealth, + } + impl ::std::fmt::Display for PostGetIndexerHealthBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetIndexerHealth => f.write_str("getIndexerHealth"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerHealthBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getIndexerHealth" => Ok(Self::GetIndexerHealth), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerHealthBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerHealthBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetIndexerHealthResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "ok if healthy", + /// "default": "ok", + /// "type": "string", + /// "enum": [ + /// "ok" + /// ] + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetIndexerHealthResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetIndexerHealthResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetIndexerHealthResponseJsonrpc, + ///ok if healthy + #[serde(default = "defaults::post_get_indexer_health_response_result")] + pub result: PostGetIndexerHealthResponseResult, + } + impl PostGetIndexerHealthResponse { + pub fn builder() -> builder::PostGetIndexerHealthResponse { + Default::default() + } + } + ///`PostGetIndexerHealthResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetIndexerHealthResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetIndexerHealthResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetIndexerHealthResponseError { + pub fn builder() -> builder::PostGetIndexerHealthResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerHealthResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetIndexerHealthResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerHealthResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerHealthResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerHealthResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerHealthResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetIndexerHealthResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerHealthResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerHealthResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerHealthResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///ok if healthy + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "ok if healthy", + /// "default": "ok", + /// "type": "string", + /// "enum": [ + /// "ok" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerHealthResponseResult { + #[serde(rename = "ok")] + Ok, + } + impl ::std::fmt::Display for PostGetIndexerHealthResponseResult { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::Ok => f.write_str("ok"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerHealthResponseResult { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "ok" => Ok(Self::Ok), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthResponseResult { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerHealthResponseResult { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerHealthResponseResult { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::default::Default for PostGetIndexerHealthResponseResult { + fn default() -> Self { + PostGetIndexerHealthResponseResult::Ok + } + } + ///`PostGetIndexerSlotBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getIndexerSlot" + /// ] + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetIndexerSlotBody { + ///An ID to identify the request. + pub id: PostGetIndexerSlotBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetIndexerSlotBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetIndexerSlotBodyMethod, + } + impl PostGetIndexerSlotBody { + pub fn builder() -> builder::PostGetIndexerSlotBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerSlotBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetIndexerSlotBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerSlotBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for PostGetIndexerSlotBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetIndexerSlotBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerSlotBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetIndexerSlotBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerSlotBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerSlotBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerSlotBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getIndexerSlot" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerSlotBodyMethod { + #[serde(rename = "getIndexerSlot")] + GetIndexerSlot, + } + impl ::std::fmt::Display for PostGetIndexerSlotBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetIndexerSlot => f.write_str("getIndexerSlot"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerSlotBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getIndexerSlot" => Ok(Self::GetIndexerSlot), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerSlotBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerSlotBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetIndexerSlotResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "default": 100, + /// "examples": [ + /// 100 + /// ], + /// "type": "integer", + /// "format": "uint64" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetIndexerSlotResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetIndexerSlotResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetIndexerSlotResponseJsonrpc, + #[serde(default = "defaults::default_u64::")] + pub result: u64, + } + impl PostGetIndexerSlotResponse { + pub fn builder() -> builder::PostGetIndexerSlotResponse { + Default::default() + } + } + ///`PostGetIndexerSlotResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetIndexerSlotResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetIndexerSlotResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetIndexerSlotResponseError { + pub fn builder() -> builder::PostGetIndexerSlotResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerSlotResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetIndexerSlotResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerSlotResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerSlotResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerSlotResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetIndexerSlotResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetIndexerSlotResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetIndexerSlotResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetIndexerSlotResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetIndexerSlotResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetLatestCompressionSignaturesBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getLatestCompressionSignatures" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetLatestCompressionSignaturesBody { + ///An ID to identify the request. + pub id: PostGetLatestCompressionSignaturesBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetLatestCompressionSignaturesBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetLatestCompressionSignaturesBodyMethod, + pub params: PostGetLatestCompressionSignaturesBodyParams, + } + impl PostGetLatestCompressionSignaturesBody { + pub fn builder() -> builder::PostGetLatestCompressionSignaturesBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestCompressionSignaturesBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetLatestCompressionSignaturesBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetLatestCompressionSignaturesBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetLatestCompressionSignaturesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestCompressionSignaturesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestCompressionSignaturesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestCompressionSignaturesBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetLatestCompressionSignaturesBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetLatestCompressionSignaturesBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetLatestCompressionSignaturesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestCompressionSignaturesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestCompressionSignaturesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getLatestCompressionSignatures" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestCompressionSignaturesBodyMethod { + #[serde(rename = "getLatestCompressionSignatures")] + GetLatestCompressionSignatures, + } + impl ::std::fmt::Display for PostGetLatestCompressionSignaturesBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetLatestCompressionSignatures => { + f.write_str("getLatestCompressionSignatures") + } + } + } + } + impl ::std::str::FromStr for PostGetLatestCompressionSignaturesBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getLatestCompressionSignatures" => { + Ok(Self::GetLatestCompressionSignatures) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetLatestCompressionSignaturesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestCompressionSignaturesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestCompressionSignaturesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetLatestCompressionSignaturesBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetLatestCompressionSignaturesBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option<::std::string::String>, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + } + impl ::std::default::Default for PostGetLatestCompressionSignaturesBodyParams { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Default::default(), + } + } + } + impl PostGetLatestCompressionSignaturesBodyParams { + pub fn builder() -> builder::PostGetLatestCompressionSignaturesBodyParams { + Default::default() + } + } + ///`PostGetLatestCompressionSignaturesResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedSignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetLatestCompressionSignaturesResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetLatestCompressionSignaturesResponseError, + >, + ///An ID to identify the response. + pub id: PostGetLatestCompressionSignaturesResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetLatestCompressionSignaturesResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetLatestCompressionSignaturesResponseResult, + >, + } + impl PostGetLatestCompressionSignaturesResponse { + pub fn builder() -> builder::PostGetLatestCompressionSignaturesResponse { + Default::default() + } + } + ///`PostGetLatestCompressionSignaturesResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetLatestCompressionSignaturesResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetLatestCompressionSignaturesResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetLatestCompressionSignaturesResponseError { + pub fn builder() -> builder::PostGetLatestCompressionSignaturesResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestCompressionSignaturesResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetLatestCompressionSignaturesResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetLatestCompressionSignaturesResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetLatestCompressionSignaturesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestCompressionSignaturesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestCompressionSignaturesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestCompressionSignaturesResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetLatestCompressionSignaturesResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetLatestCompressionSignaturesResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetLatestCompressionSignaturesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestCompressionSignaturesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestCompressionSignaturesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetLatestCompressionSignaturesResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/PaginatedSignatureInfoList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetLatestCompressionSignaturesResponseResult { + pub context: Context, + pub value: PaginatedSignatureInfoList, + } + impl PostGetLatestCompressionSignaturesResponseResult { + pub fn builder() -> builder::PostGetLatestCompressionSignaturesResponseResult { + Default::default() + } + } + ///`PostGetLatestNonVotingSignaturesBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getLatestNonVotingSignatures" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetLatestNonVotingSignaturesBody { + ///An ID to identify the request. + pub id: PostGetLatestNonVotingSignaturesBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetLatestNonVotingSignaturesBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetLatestNonVotingSignaturesBodyMethod, + pub params: PostGetLatestNonVotingSignaturesBodyParams, + } + impl PostGetLatestNonVotingSignaturesBody { + pub fn builder() -> builder::PostGetLatestNonVotingSignaturesBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestNonVotingSignaturesBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetLatestNonVotingSignaturesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestNonVotingSignaturesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestNonVotingSignaturesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestNonVotingSignaturesBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetLatestNonVotingSignaturesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestNonVotingSignaturesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestNonVotingSignaturesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getLatestNonVotingSignatures" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestNonVotingSignaturesBodyMethod { + #[serde(rename = "getLatestNonVotingSignatures")] + GetLatestNonVotingSignatures, + } + impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetLatestNonVotingSignatures => { + f.write_str("getLatestNonVotingSignatures") + } + } + } + } + impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getLatestNonVotingSignatures" => Ok(Self::GetLatestNonVotingSignatures), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetLatestNonVotingSignaturesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestNonVotingSignaturesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestNonVotingSignaturesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetLatestNonVotingSignaturesBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "cursor": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "limit": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Limit" + /// } + /// ] + /// } + /// ] + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetLatestNonVotingSignaturesBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option<::std::string::String>, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub limit: ::std::option::Option, + } + impl ::std::default::Default for PostGetLatestNonVotingSignaturesBodyParams { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Default::default(), + } + } + } + impl PostGetLatestNonVotingSignaturesBodyParams { + pub fn builder() -> builder::PostGetLatestNonVotingSignaturesBodyParams { + Default::default() + } + } + ///`PostGetLatestNonVotingSignaturesResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/SignatureInfoListWithError" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetLatestNonVotingSignaturesResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetLatestNonVotingSignaturesResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetLatestNonVotingSignaturesResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetLatestNonVotingSignaturesResponseResult, + >, + } + impl PostGetLatestNonVotingSignaturesResponse { + pub fn builder() -> builder::PostGetLatestNonVotingSignaturesResponse { + Default::default() + } + } + ///`PostGetLatestNonVotingSignaturesResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetLatestNonVotingSignaturesResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetLatestNonVotingSignaturesResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetLatestNonVotingSignaturesResponseError { + pub fn builder() -> builder::PostGetLatestNonVotingSignaturesResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestNonVotingSignaturesResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetLatestNonVotingSignaturesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestNonVotingSignaturesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestNonVotingSignaturesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetLatestNonVotingSignaturesResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetLatestNonVotingSignaturesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetLatestNonVotingSignaturesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetLatestNonVotingSignaturesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetLatestNonVotingSignaturesResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/SignatureInfoListWithError" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetLatestNonVotingSignaturesResponseResult { + pub context: Context, + pub value: SignatureInfoListWithError, + } + impl PostGetLatestNonVotingSignaturesResponseResult { + pub fn builder() -> builder::PostGetLatestNonVotingSignaturesResponseResult { + Default::default() + } + } + ///`PostGetMultipleAccountInterfacesBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleAccountInterfaces" + /// ] + /// }, + /// "params": { + /// "description": "Request for getMultipleAccountInterfaces", + /// "type": "object", + /// "required": [ + /// "addresses" + /// ], + /// "properties": { + /// "addresses": { + /// "description": "List of account addresses to look up (max 100)\nServer auto-detects account type (account, token, mint) based on program owner and data", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesBody { + ///An ID to identify the request. + pub id: PostGetMultipleAccountInterfacesBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleAccountInterfacesBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetMultipleAccountInterfacesBodyMethod, + pub params: PostGetMultipleAccountInterfacesBodyParams, + } + impl PostGetMultipleAccountInterfacesBody { + pub fn builder() -> builder::PostGetMultipleAccountInterfacesBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleAccountInterfacesBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleAccountInterfacesBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleAccountInterfacesBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleAccountInterfacesBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleAccountInterfacesBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleAccountInterfacesBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleAccountInterfaces" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleAccountInterfacesBodyMethod { + #[serde(rename = "getMultipleAccountInterfaces")] + GetMultipleAccountInterfaces, + } + impl ::std::fmt::Display for PostGetMultipleAccountInterfacesBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetMultipleAccountInterfaces => { + f.write_str("getMultipleAccountInterfaces") + } + } + } + } + impl ::std::str::FromStr for PostGetMultipleAccountInterfacesBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getMultipleAccountInterfaces" => Ok(Self::GetMultipleAccountInterfaces), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for getMultipleAccountInterfaces + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for getMultipleAccountInterfaces", + /// "type": "object", + /// "required": [ + /// "addresses" + /// ], + /// "properties": { + /// "addresses": { + /// "description": "List of account addresses to look up (max 100)\nServer auto-detects account type (account, token, mint) based on program owner and data", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetMultipleAccountInterfacesBodyParams { + /**List of account addresses to look up (max 100) +Server auto-detects account type (account, token, mint) based on program owner and data*/ + pub addresses: ::std::vec::Vec, + } + impl PostGetMultipleAccountInterfacesBodyParams { + pub fn builder() -> builder::PostGetMultipleAccountInterfacesBodyParams { + Default::default() + } + } + ///`PostGetMultipleAccountInterfacesResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "Response for getMultipleAccountInterfaces", + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "description": "List of typed results (Some for found accounts, None for not found)", + /// "type": "array", + /// "items": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InterfaceResult" + /// } + /// ] + /// } + /// ] + /// } + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetMultipleAccountInterfacesResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleAccountInterfacesResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetMultipleAccountInterfacesResponseResult, + >, + } + impl PostGetMultipleAccountInterfacesResponse { + pub fn builder() -> builder::PostGetMultipleAccountInterfacesResponse { + Default::default() + } + } + ///`PostGetMultipleAccountInterfacesResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetMultipleAccountInterfacesResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetMultipleAccountInterfacesResponseError { + pub fn builder() -> builder::PostGetMultipleAccountInterfacesResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleAccountInterfacesResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleAccountInterfacesResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleAccountInterfacesResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleAccountInterfacesResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleAccountInterfacesResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleAccountInterfacesResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Response for getMultipleAccountInterfaces + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Response for getMultipleAccountInterfaces", + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "description": "List of typed results (Some for found accounts, None for not found)", + /// "type": "array", + /// "items": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InterfaceResult" + /// } + /// ] + /// } + /// ] + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesResponseResult { + pub context: Context, + ///List of typed results (Some for found accounts, None for not found) + pub value: ::std::vec::Vec<::std::option::Option>, + } + impl PostGetMultipleAccountInterfacesResponseResult { + pub fn builder() -> builder::PostGetMultipleAccountInterfacesResponseResult { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountProofsBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleCompressedAccountProofs" + /// ] + /// }, + /// "params": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsBody { + ///An ID to identify the request. + pub id: PostGetMultipleCompressedAccountProofsBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleCompressedAccountProofsBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetMultipleCompressedAccountProofsBodyMethod, + pub params: ::std::vec::Vec, + } + impl PostGetMultipleCompressedAccountProofsBody { + pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountProofsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleCompressedAccountProofs" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsBodyMethod { + #[serde(rename = "getMultipleCompressedAccountProofs")] + GetMultipleCompressedAccountProofs, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetMultipleCompressedAccountProofs => { + f.write_str("getMultipleCompressedAccountProofs") + } + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getMultipleCompressedAccountProofs" => { + Ok(Self::GetMultipleCompressedAccountProofs) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleCompressedAccountProofsResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/GetCompressedAccountProofResponseValue" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetMultipleCompressedAccountProofsResponseError, + >, + ///An ID to identify the response. + pub id: PostGetMultipleCompressedAccountProofsResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleCompressedAccountProofsResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetMultipleCompressedAccountProofsResponseResult, + >, + } + impl PostGetMultipleCompressedAccountProofsResponse { + pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsResponse { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountProofsResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountProofsResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetMultipleCompressedAccountProofsResponseError { + pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleCompressedAccountProofsResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/GetCompressedAccountProofResponseValue" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetMultipleCompressedAccountProofsResponseResult { + pub context: Context, + pub value: ::std::vec::Vec, + } + impl PostGetMultipleCompressedAccountProofsResponseResult { + pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsResponseResult { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountProofsV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleCompressedAccountProofsV2" + /// ] + /// }, + /// "params": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsV2Body { + ///An ID to identify the request. + pub id: PostGetMultipleCompressedAccountProofsV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleCompressedAccountProofsV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetMultipleCompressedAccountProofsV2BodyMethod, + pub params: ::std::vec::Vec, + } + impl PostGetMultipleCompressedAccountProofsV2Body { + pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleCompressedAccountProofsV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsV2BodyMethod { + #[serde(rename = "getMultipleCompressedAccountProofsV2")] + GetMultipleCompressedAccountProofsV2, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetMultipleCompressedAccountProofsV2 => { + f.write_str("getMultipleCompressedAccountProofsV2") + } + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getMultipleCompressedAccountProofsV2" => { + Ok(Self::GetMultipleCompressedAccountProofsV2) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleCompressedAccountProofsV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/GetCompressedAccountProofResponseValueV2" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetMultipleCompressedAccountProofsV2ResponseError, + >, + ///An ID to identify the response. + pub id: PostGetMultipleCompressedAccountProofsV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetMultipleCompressedAccountProofsV2ResponseResult, + >, + } + impl PostGetMultipleCompressedAccountProofsV2Response { + pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsV2Response { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountProofsV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountProofsV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetMultipleCompressedAccountProofsV2ResponseError { + pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display + for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr + for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleCompressedAccountProofsV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/GetCompressedAccountProofResponseValueV2" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetMultipleCompressedAccountProofsV2ResponseResult { + pub context: Context, + pub value: ::std::vec::Vec, + } + impl PostGetMultipleCompressedAccountProofsV2ResponseResult { + pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsV2ResponseResult { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountsBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleCompressedAccounts" + /// ] + /// }, + /// "params": { + /// "description": "Request for compressed account data", + /// "default": { + /// "addresses": null, + /// "hashes": [ + /// "11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs", + /// "1117mWrzzrZr312ebPDHu8tbfMwFNvCvMbr6WepCNG" + /// ] + /// }, + /// "examples": [ + /// { + /// "addresses": null, + /// "hashes": [ + /// "11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs", + /// "1117mWrzzrZr312ebPDHu8tbfMwFNvCvMbr6WepCNG" + /// ] + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "addresses": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "hashes": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsBody { + ///An ID to identify the request. + pub id: PostGetMultipleCompressedAccountsBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleCompressedAccountsBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetMultipleCompressedAccountsBodyMethod, + pub params: PostGetMultipleCompressedAccountsBodyParams, + } + impl PostGetMultipleCompressedAccountsBody { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleCompressedAccounts" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsBodyMethod { + #[serde(rename = "getMultipleCompressedAccounts")] + GetMultipleCompressedAccounts, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetMultipleCompressedAccounts => { + f.write_str("getMultipleCompressedAccounts") + } + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getMultipleCompressedAccounts" => { + Ok(Self::GetMultipleCompressedAccounts) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for compressed account data + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for compressed account data", + /// "default": { + /// "addresses": null, + /// "hashes": [ + /// "11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs", + /// "1117mWrzzrZr312ebPDHu8tbfMwFNvCvMbr6WepCNG" + /// ] + /// }, + /// "examples": [ + /// { + /// "addresses": null, + /// "hashes": [ + /// "11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs", + /// "1117mWrzzrZr312ebPDHu8tbfMwFNvCvMbr6WepCNG" + /// ] + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "addresses": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "hashes": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetMultipleCompressedAccountsBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub addresses: ::std::option::Option<::std::vec::Vec>, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub hashes: ::std::option::Option<::std::vec::Vec>, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsBodyParams { + fn default() -> Self { + PostGetMultipleCompressedAccountsBodyParams { + addresses: ::std::option::Option::None, + hashes: ::std::option::Option::Some( + vec![ + Hash("11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs".to_string()), + Hash("1117mWrzzrZr312ebPDHu8tbfMwFNvCvMbr6WepCNG".to_string()) + ], + ), + } + } + } + impl PostGetMultipleCompressedAccountsBodyParams { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsBodyParams { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountsResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/AccountList" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetMultipleCompressedAccountsResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleCompressedAccountsResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetMultipleCompressedAccountsResponseResult, + >, + } + impl PostGetMultipleCompressedAccountsResponse { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsResponse { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountsResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetMultipleCompressedAccountsResponseError { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleCompressedAccountsResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/AccountList" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetMultipleCompressedAccountsResponseResult { + pub context: Context, + pub value: AccountList, + } + impl PostGetMultipleCompressedAccountsResponseResult { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsResponseResult { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountsV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleCompressedAccountsV2" + /// ] + /// }, + /// "params": { + /// "description": "Request for compressed account data", + /// "default": { + /// "addresses": null, + /// "hashes": [ + /// "1119DWteoLSdjvrT6g6L8C2PfDD2faiTQUpsjY2RiF", + /// "111BuZ6b86gm7XhxjvTakhRvxSMjXp2GqgifkNUmDK" + /// ] + /// }, + /// "examples": [ + /// { + /// "addresses": null, + /// "hashes": [ + /// "1119DWteoLSdjvrT6g6L8C2PfDD2faiTQUpsjY2RiF", + /// "111BuZ6b86gm7XhxjvTakhRvxSMjXp2GqgifkNUmDK" + /// ] + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "addresses": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "hashes": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsV2Body { + ///An ID to identify the request. + pub id: PostGetMultipleCompressedAccountsV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleCompressedAccountsV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetMultipleCompressedAccountsV2BodyMethod, + pub params: PostGetMultipleCompressedAccountsV2BodyParams, + } + impl PostGetMultipleCompressedAccountsV2Body { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleCompressedAccountsV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsV2BodyMethod { + #[serde(rename = "getMultipleCompressedAccountsV2")] + GetMultipleCompressedAccountsV2, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetMultipleCompressedAccountsV2 => { + f.write_str("getMultipleCompressedAccountsV2") + } + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getMultipleCompressedAccountsV2" => { + Ok(Self::GetMultipleCompressedAccountsV2) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for compressed account data + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for compressed account data", + /// "default": { + /// "addresses": null, + /// "hashes": [ + /// "1119DWteoLSdjvrT6g6L8C2PfDD2faiTQUpsjY2RiF", + /// "111BuZ6b86gm7XhxjvTakhRvxSMjXp2GqgifkNUmDK" + /// ] + /// }, + /// "examples": [ + /// { + /// "addresses": null, + /// "hashes": [ + /// "1119DWteoLSdjvrT6g6L8C2PfDD2faiTQUpsjY2RiF", + /// "111BuZ6b86gm7XhxjvTakhRvxSMjXp2GqgifkNUmDK" + /// ] + /// } + /// ], + /// "type": "object", + /// "properties": { + /// "addresses": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "hashes": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetMultipleCompressedAccountsV2BodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub addresses: ::std::option::Option<::std::vec::Vec>, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub hashes: ::std::option::Option<::std::vec::Vec>, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsV2BodyParams { + fn default() -> Self { + PostGetMultipleCompressedAccountsV2BodyParams { + addresses: ::std::option::Option::None, + hashes: ::std::option::Option::Some( + vec![ + Hash("1119DWteoLSdjvrT6g6L8C2PfDD2faiTQUpsjY2RiF".to_string()), + Hash("111BuZ6b86gm7XhxjvTakhRvxSMjXp2GqgifkNUmDK".to_string()) + ], + ), + } + } + } + impl PostGetMultipleCompressedAccountsV2BodyParams { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2BodyParams { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountsV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/AccountListV2" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetMultipleCompressedAccountsV2ResponseError, + >, + ///An ID to identify the response. + pub id: PostGetMultipleCompressedAccountsV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleCompressedAccountsV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetMultipleCompressedAccountsV2ResponseResult, + >, + } + impl PostGetMultipleCompressedAccountsV2Response { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2Response { + Default::default() + } + } + ///`PostGetMultipleCompressedAccountsV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetMultipleCompressedAccountsV2ResponseError { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleCompressedAccountsV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleCompressedAccountsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleCompressedAccountsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleCompressedAccountsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleCompressedAccountsV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/AccountListV2" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetMultipleCompressedAccountsV2ResponseResult { + pub context: Context, + pub value: AccountListV2, + } + impl PostGetMultipleCompressedAccountsV2ResponseResult { + pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2ResponseResult { + Default::default() + } + } + ///`PostGetMultipleNewAddressProofsBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleNewAddressProofs" + /// ] + /// }, + /// "params": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsBody { + ///An ID to identify the request. + pub id: PostGetMultipleNewAddressProofsBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleNewAddressProofsBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetMultipleNewAddressProofsBodyMethod, + pub params: ::std::vec::Vec, + } + impl PostGetMultipleNewAddressProofsBody { + pub fn builder() -> builder::PostGetMultipleNewAddressProofsBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleNewAddressProofs" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsBodyMethod { + #[serde(rename = "getMultipleNewAddressProofs")] + GetMultipleNewAddressProofs, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetMultipleNewAddressProofs => { + f.write_str("getMultipleNewAddressProofs") + } + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getMultipleNewAddressProofs" => Ok(Self::GetMultipleNewAddressProofs), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleNewAddressProofsResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/MerkleContextWithNewAddressProof" + /// } + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetMultipleNewAddressProofsResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleNewAddressProofsResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetMultipleNewAddressProofsResponse { + pub fn builder() -> builder::PostGetMultipleNewAddressProofsResponse { + Default::default() + } + } + ///`PostGetMultipleNewAddressProofsResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetMultipleNewAddressProofsResponseError { + pub fn builder() -> builder::PostGetMultipleNewAddressProofsResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleNewAddressProofsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleNewAddressProofsResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/MerkleContextWithNewAddressProof" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsResponseResult { + pub context: Context, + pub value: ::std::vec::Vec, + } + impl PostGetMultipleNewAddressProofsResponseResult { + pub fn builder() -> builder::PostGetMultipleNewAddressProofsResponseResult { + Default::default() + } + } + ///`PostGetMultipleNewAddressProofsV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleNewAddressProofsV2" + /// ] + /// }, + /// "params": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AddressWithTree" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsV2Body { + ///An ID to identify the request. + pub id: PostGetMultipleNewAddressProofsV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleNewAddressProofsV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetMultipleNewAddressProofsV2BodyMethod, + pub params: ::std::vec::Vec, + } + impl PostGetMultipleNewAddressProofsV2Body { + pub fn builder() -> builder::PostGetMultipleNewAddressProofsV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getMultipleNewAddressProofsV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsV2BodyMethod { + #[serde(rename = "getMultipleNewAddressProofsV2")] + GetMultipleNewAddressProofsV2, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetMultipleNewAddressProofsV2 => { + f.write_str("getMultipleNewAddressProofsV2") + } + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getMultipleNewAddressProofsV2" => { + Ok(Self::GetMultipleNewAddressProofsV2) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleNewAddressProofsV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/MerkleContextWithNewAddressProof" + /// } + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetMultipleNewAddressProofsV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetMultipleNewAddressProofsV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetMultipleNewAddressProofsV2ResponseResult, + >, + } + impl PostGetMultipleNewAddressProofsV2Response { + pub fn builder() -> builder::PostGetMultipleNewAddressProofsV2Response { + Default::default() + } + } + ///`PostGetMultipleNewAddressProofsV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetMultipleNewAddressProofsV2ResponseError { + pub fn builder() -> builder::PostGetMultipleNewAddressProofsV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetMultipleNewAddressProofsV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetMultipleNewAddressProofsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetMultipleNewAddressProofsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetMultipleNewAddressProofsV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetMultipleNewAddressProofsV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/MerkleContextWithNewAddressProof" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsV2ResponseResult { + pub context: Context, + pub value: ::std::vec::Vec, + } + impl PostGetMultipleNewAddressProofsV2ResponseResult { + pub fn builder() -> builder::PostGetMultipleNewAddressProofsV2ResponseResult { + Default::default() + } + } + ///`PostGetQueueElementsBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getQueueElements" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "tree" + /// ], + /// "properties": { + /// "addressQueue": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/QueueRequest" + /// } + /// ] + /// } + /// ] + /// }, + /// "inputQueue": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/QueueRequest" + /// } + /// ] + /// } + /// ] + /// }, + /// "outputQueue": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/QueueRequest" + /// } + /// ] + /// } + /// ] + /// }, + /// "tree": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetQueueElementsBody { + ///An ID to identify the request. + pub id: PostGetQueueElementsBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetQueueElementsBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetQueueElementsBodyMethod, + pub params: PostGetQueueElementsBodyParams, + } + impl PostGetQueueElementsBody { + pub fn builder() -> builder::PostGetQueueElementsBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueElementsBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetQueueElementsBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetQueueElementsBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueElementsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for PostGetQueueElementsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueElementsBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueElementsBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetQueueElementsBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetQueueElementsBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueElementsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetQueueElementsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetQueueElementsBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getQueueElements" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueElementsBodyMethod { + #[serde(rename = "getQueueElements")] + GetQueueElements, + } + impl ::std::fmt::Display for PostGetQueueElementsBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetQueueElements => f.write_str("getQueueElements"), + } + } + } + impl ::std::str::FromStr for PostGetQueueElementsBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getQueueElements" => Ok(Self::GetQueueElements), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueElementsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetQueueElementsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetQueueElementsBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetQueueElementsBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "tree" + /// ], + /// "properties": { + /// "addressQueue": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/QueueRequest" + /// } + /// ] + /// } + /// ] + /// }, + /// "inputQueue": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/QueueRequest" + /// } + /// ] + /// } + /// ] + /// }, + /// "outputQueue": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/QueueRequest" + /// } + /// ] + /// } + /// ] + /// }, + /// "tree": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetQueueElementsBodyParams { + #[serde( + rename = "addressQueue", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub address_queue: ::std::option::Option, + #[serde( + rename = "inputQueue", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub input_queue: ::std::option::Option, + #[serde( + rename = "outputQueue", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub output_queue: ::std::option::Option, + pub tree: Hash, + } + impl PostGetQueueElementsBodyParams { + pub fn builder() -> builder::PostGetQueueElementsBodyParams { + Default::default() + } + } + ///`PostGetQueueElementsResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "addressQueue": { + /// "$ref": "#/components/schemas/AddressQueueData" + /// }, + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "stateQueue": { + /// "$ref": "#/components/schemas/StateQueueData" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetQueueElementsResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetQueueElementsResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetQueueElementsResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetQueueElementsResponse { + pub fn builder() -> builder::PostGetQueueElementsResponse { + Default::default() + } + } + ///`PostGetQueueElementsResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetQueueElementsResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetQueueElementsResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetQueueElementsResponseError { + pub fn builder() -> builder::PostGetQueueElementsResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueElementsResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetQueueElementsResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetQueueElementsResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueElementsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetQueueElementsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetQueueElementsResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueElementsResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetQueueElementsResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetQueueElementsResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueElementsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetQueueElementsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetQueueElementsResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetQueueElementsResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "addressQueue": { + /// "$ref": "#/components/schemas/AddressQueueData" + /// }, + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "stateQueue": { + /// "$ref": "#/components/schemas/StateQueueData" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetQueueElementsResponseResult { + #[serde( + rename = "addressQueue", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub address_queue: ::std::option::Option, + pub context: Context, + #[serde( + rename = "stateQueue", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub state_queue: ::std::option::Option, + } + impl PostGetQueueElementsResponseResult { + pub fn builder() -> builder::PostGetQueueElementsResponseResult { + Default::default() + } + } + ///`PostGetQueueInfoBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getQueueInfo" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "properties": { + /// "trees": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "type": "string" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetQueueInfoBody { + ///An ID to identify the request. + pub id: PostGetQueueInfoBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetQueueInfoBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetQueueInfoBodyMethod, + pub params: PostGetQueueInfoBodyParams, + } + impl PostGetQueueInfoBody { + pub fn builder() -> builder::PostGetQueueInfoBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueInfoBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetQueueInfoBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetQueueInfoBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueInfoBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for PostGetQueueInfoBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueInfoBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueInfoBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetQueueInfoBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetQueueInfoBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueInfoBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetQueueInfoBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueInfoBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getQueueInfo" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueInfoBodyMethod { + #[serde(rename = "getQueueInfo")] + GetQueueInfo, + } + impl ::std::fmt::Display for PostGetQueueInfoBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetQueueInfo => f.write_str("getQueueInfo"), + } + } + } + impl ::std::str::FromStr for PostGetQueueInfoBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getQueueInfo" => Ok(Self::GetQueueInfo), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueInfoBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for PostGetQueueInfoBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueInfoBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetQueueInfoBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "trees": { + /// "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "type": "string" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetQueueInfoBodyParams { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub trees: ::std::option::Option<::std::vec::Vec<::std::string::String>>, + } + impl ::std::default::Default for PostGetQueueInfoBodyParams { + fn default() -> Self { + Self { trees: Default::default() } + } + } + impl PostGetQueueInfoBodyParams { + pub fn builder() -> builder::PostGetQueueInfoBodyParams { + Default::default() + } + } + ///`PostGetQueueInfoResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "queues", + /// "slot" + /// ], + /// "properties": { + /// "queues": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/QueueInfo" + /// } + /// }, + /// "slot": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetQueueInfoResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetQueueInfoResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetQueueInfoResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetQueueInfoResponse { + pub fn builder() -> builder::PostGetQueueInfoResponse { + Default::default() + } + } + ///`PostGetQueueInfoResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetQueueInfoResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetQueueInfoResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetQueueInfoResponseError { + pub fn builder() -> builder::PostGetQueueInfoResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueInfoResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetQueueInfoResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetQueueInfoResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueInfoResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for PostGetQueueInfoResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueInfoResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetQueueInfoResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetQueueInfoResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetQueueInfoResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetQueueInfoResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetQueueInfoResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetQueueInfoResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetQueueInfoResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "queues", + /// "slot" + /// ], + /// "properties": { + /// "queues": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/QueueInfo" + /// } + /// }, + /// "slot": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetQueueInfoResponseResult { + pub queues: ::std::vec::Vec, + pub slot: u64, + } + impl PostGetQueueInfoResponseResult { + pub fn builder() -> builder::PostGetQueueInfoResponseResult { + Default::default() + } + } + ///`PostGetTokenAccountInterfaceBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getTokenAccountInterface" + /// ] + /// }, + /// "params": { + /// "description": "Request for getTokenAccountInterface", + /// "type": "object", + /// "required": [ + /// "address" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTokenAccountInterfaceBody { + ///An ID to identify the request. + pub id: PostGetTokenAccountInterfaceBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetTokenAccountInterfaceBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetTokenAccountInterfaceBodyMethod, + pub params: PostGetTokenAccountInterfaceBodyParams, + } + impl PostGetTokenAccountInterfaceBody { + pub fn builder() -> builder::PostGetTokenAccountInterfaceBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfaceBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfaceBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfaceBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfaceBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfaceBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfaceBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfaceBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfaceBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getTokenAccountInterface" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfaceBodyMethod { + #[serde(rename = "getTokenAccountInterface")] + GetTokenAccountInterface, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfaceBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetTokenAccountInterface => f.write_str("getTokenAccountInterface"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfaceBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getTokenAccountInterface" => Ok(Self::GetTokenAccountInterface), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfaceBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for getTokenAccountInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for getTokenAccountInterface", + /// "type": "object", + /// "required": [ + /// "address" + /// ], + /// "properties": { + /// "address": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetTokenAccountInterfaceBodyParams { + pub address: SerializablePubkey, + } + impl PostGetTokenAccountInterfaceBodyParams { + pub fn builder() -> builder::PostGetTokenAccountInterfaceBodyParams { + Default::default() + } + } + ///`PostGetTokenAccountInterfaceResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "Response for getTokenAccountInterface", + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountInterface" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTokenAccountInterfaceResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetTokenAccountInterfaceResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetTokenAccountInterfaceResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetTokenAccountInterfaceResponse { + pub fn builder() -> builder::PostGetTokenAccountInterfaceResponse { + Default::default() + } + } + ///`PostGetTokenAccountInterfaceResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTokenAccountInterfaceResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetTokenAccountInterfaceResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetTokenAccountInterfaceResponseError { + pub fn builder() -> builder::PostGetTokenAccountInterfaceResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfaceResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfaceResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfaceResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfaceResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfaceResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfaceResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfaceResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfaceResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Response for getTokenAccountInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Response for getTokenAccountInterface", + /// "type": "object", + /// "required": [ + /// "context" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/TokenAccountInterface" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTokenAccountInterfaceResponseResult { + pub context: Context, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub value: ::std::option::Option, + } + impl PostGetTokenAccountInterfaceResponseResult { + pub fn builder() -> builder::PostGetTokenAccountInterfaceResponseResult { + Default::default() + } + } + ///`PostGetTokenAccountInterfacesBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getTokenAccountInterfaces" + /// ] + /// }, + /// "params": { + /// "description": "Request for getTokenAccountInterfaces (batch)", + /// "type": "object", + /// "required": [ + /// "addresses" + /// ], + /// "properties": { + /// "addresses": { + /// "description": "List of token account addresses to look up (max 100)", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTokenAccountInterfacesBody { + ///An ID to identify the request. + pub id: PostGetTokenAccountInterfacesBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetTokenAccountInterfacesBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetTokenAccountInterfacesBodyMethod, + pub params: PostGetTokenAccountInterfacesBodyParams, + } + impl PostGetTokenAccountInterfacesBody { + pub fn builder() -> builder::PostGetTokenAccountInterfacesBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfacesBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfacesBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfacesBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfacesBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfacesBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfacesBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfacesBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfacesBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getTokenAccountInterfaces" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfacesBodyMethod { + #[serde(rename = "getTokenAccountInterfaces")] + GetTokenAccountInterfaces, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfacesBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetTokenAccountInterfaces => { + f.write_str("getTokenAccountInterfaces") + } + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfacesBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getTokenAccountInterfaces" => Ok(Self::GetTokenAccountInterfaces), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfacesBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Request for getTokenAccountInterfaces (batch) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Request for getTokenAccountInterfaces (batch)", + /// "type": "object", + /// "required": [ + /// "addresses" + /// ], + /// "properties": { + /// "addresses": { + /// "description": "List of token account addresses to look up (max 100)", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetTokenAccountInterfacesBodyParams { + ///List of token account addresses to look up (max 100) + pub addresses: ::std::vec::Vec, + } + impl PostGetTokenAccountInterfacesBodyParams { + pub fn builder() -> builder::PostGetTokenAccountInterfacesBodyParams { + Default::default() + } + } + ///`PostGetTokenAccountInterfacesResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "Response for getTokenAccountInterfaces (batch)", + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/TokenAccountInterface" + /// } + /// ] + /// } + /// ] + /// } + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTokenAccountInterfacesResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetTokenAccountInterfacesResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetTokenAccountInterfacesResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetTokenAccountInterfacesResponse { + pub fn builder() -> builder::PostGetTokenAccountInterfacesResponse { + Default::default() + } + } + ///`PostGetTokenAccountInterfacesResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTokenAccountInterfacesResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetTokenAccountInterfacesResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetTokenAccountInterfacesResponseError { + pub fn builder() -> builder::PostGetTokenAccountInterfacesResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfacesResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfacesResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfacesResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfacesResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTokenAccountInterfacesResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetTokenAccountInterfacesResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetTokenAccountInterfacesResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTokenAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTokenAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTokenAccountInterfacesResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///Response for getTokenAccountInterfaces (batch) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Response for getTokenAccountInterfaces (batch)", + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "type": "array", + /// "items": { + /// "oneOf": [ + /// { + /// "type": "null" + /// }, + /// { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/TokenAccountInterface" + /// } + /// ] + /// } + /// ] + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTokenAccountInterfacesResponseResult { + pub context: Context, + pub value: ::std::vec::Vec<::std::option::Option>, + } + impl PostGetTokenAccountInterfacesResponseResult { + pub fn builder() -> builder::PostGetTokenAccountInterfacesResponseResult { + Default::default() + } + } + ///`PostGetTransactionWithCompressionInfoBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getTransactionWithCompressionInfo" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "signature" + /// ], + /// "properties": { + /// "signature": { + /// "$ref": "#/components/schemas/SerializableSignature" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoBody { + ///An ID to identify the request. + pub id: PostGetTransactionWithCompressionInfoBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetTransactionWithCompressionInfoBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetTransactionWithCompressionInfoBodyMethod, + pub params: PostGetTransactionWithCompressionInfoBodyParams, + } + impl PostGetTransactionWithCompressionInfoBody { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetTransactionWithCompressionInfoBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getTransactionWithCompressionInfo" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoBodyMethod { + #[serde(rename = "getTransactionWithCompressionInfo")] + GetTransactionWithCompressionInfo, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetTransactionWithCompressionInfo => { + f.write_str("getTransactionWithCompressionInfo") + } + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getTransactionWithCompressionInfo" => { + Ok(Self::GetTransactionWithCompressionInfo) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetTransactionWithCompressionInfoBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "signature" + /// ], + /// "properties": { + /// "signature": { + /// "$ref": "#/components/schemas/SerializableSignature" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetTransactionWithCompressionInfoBodyParams { + pub signature: SerializableSignature, + } + impl PostGetTransactionWithCompressionInfoBodyParams { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoBodyParams { + Default::default() + } + } + ///`PostGetTransactionWithCompressionInfoResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "A Solana transaction with additional compression information", + /// "type": "object", + /// "properties": { + /// "compression_info": { + /// "type": "object", + /// "required": [ + /// "closedAccounts", + /// "openedAccounts" + /// ], + /// "properties": { + /// "closedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenData" + /// } + /// }, + /// "openedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenData" + /// } + /// } + /// }, + /// "additionalProperties": false + /// }, + /// "transaction": { + /// "description": "An encoded confirmed transaction with status meta", + /// "type": "object" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetTransactionWithCompressionInfoResponseError, + >, + ///An ID to identify the response. + pub id: PostGetTransactionWithCompressionInfoResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetTransactionWithCompressionInfoResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetTransactionWithCompressionInfoResponseResult, + >, + } + impl PostGetTransactionWithCompressionInfoResponse { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoResponse { + Default::default() + } + } + ///`PostGetTransactionWithCompressionInfoResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetTransactionWithCompressionInfoResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetTransactionWithCompressionInfoResponseError { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///A Solana transaction with additional compression information + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A Solana transaction with additional compression information", + /// "type": "object", + /// "properties": { + /// "compression_info": { + /// "type": "object", + /// "required": [ + /// "closedAccounts", + /// "openedAccounts" + /// ], + /// "properties": { + /// "closedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenData" + /// } + /// }, + /// "openedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenData" + /// } + /// } + /// }, + /// "additionalProperties": false + /// }, + /// "transaction": { + /// "description": "An encoded confirmed transaction with status meta", + /// "type": "object" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoResponseResult { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub compression_info: ::std::option::Option< + PostGetTransactionWithCompressionInfoResponseResultCompressionInfo, + >, + ///An encoded confirmed transaction with status meta + #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")] + pub transaction: ::serde_json::Map<::std::string::String, ::serde_json::Value>, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoResponseResult { + fn default() -> Self { + Self { + compression_info: Default::default(), + transaction: Default::default(), + } + } + } + impl PostGetTransactionWithCompressionInfoResponseResult { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoResponseResult { + Default::default() + } + } + ///`PostGetTransactionWithCompressionInfoResponseResultCompressionInfo` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "closedAccounts", + /// "openedAccounts" + /// ], + /// "properties": { + /// "closedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenData" + /// } + /// }, + /// "openedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenData" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetTransactionWithCompressionInfoResponseResultCompressionInfo { + #[serde(rename = "closedAccounts")] + pub closed_accounts: ::std::vec::Vec, + #[serde(rename = "openedAccounts")] + pub opened_accounts: ::std::vec::Vec, + } + impl PostGetTransactionWithCompressionInfoResponseResultCompressionInfo { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo { + Default::default() + } + } + ///`PostGetTransactionWithCompressionInfoV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getTransactionWithCompressionInfoV2" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "required": [ + /// "signature" + /// ], + /// "properties": { + /// "signature": { + /// "$ref": "#/components/schemas/SerializableSignature" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2Body { + ///An ID to identify the request. + pub id: PostGetTransactionWithCompressionInfoV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetTransactionWithCompressionInfoV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetTransactionWithCompressionInfoV2BodyMethod, + pub params: PostGetTransactionWithCompressionInfoV2BodyParams, + } + impl PostGetTransactionWithCompressionInfoV2Body { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getTransactionWithCompressionInfoV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoV2BodyMethod { + #[serde(rename = "getTransactionWithCompressionInfoV2")] + GetTransactionWithCompressionInfoV2, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetTransactionWithCompressionInfoV2 => { + f.write_str("getTransactionWithCompressionInfoV2") + } + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getTransactionWithCompressionInfoV2" => { + Ok(Self::GetTransactionWithCompressionInfoV2) + } + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetTransactionWithCompressionInfoV2BodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "signature" + /// ], + /// "properties": { + /// "signature": { + /// "$ref": "#/components/schemas/SerializableSignature" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetTransactionWithCompressionInfoV2BodyParams { + pub signature: SerializableSignature, + } + impl PostGetTransactionWithCompressionInfoV2BodyParams { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2BodyParams { + Default::default() + } + } + ///`PostGetTransactionWithCompressionInfoV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "description": "A Solana transaction with additional compression information", + /// "type": "object", + /// "properties": { + /// "compression_info": { + /// "type": "object", + /// "required": [ + /// "closedAccounts", + /// "openedAccounts" + /// ], + /// "properties": { + /// "closedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ClosedAccountWithOptionalTokenDataV2" + /// } + /// }, + /// "openedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenDataV2" + /// } + /// } + /// }, + /// "additionalProperties": false + /// }, + /// "transaction": { + /// "description": "An encoded confirmed transaction with status meta", + /// "type": "object" + /// } + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option< + PostGetTransactionWithCompressionInfoV2ResponseError, + >, + ///An ID to identify the response. + pub id: PostGetTransactionWithCompressionInfoV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetTransactionWithCompressionInfoV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option< + PostGetTransactionWithCompressionInfoV2ResponseResult, + >, + } + impl PostGetTransactionWithCompressionInfoV2Response { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2Response { + Default::default() + } + } + ///`PostGetTransactionWithCompressionInfoV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetTransactionWithCompressionInfoV2ResponseError { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetTransactionWithCompressionInfoV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> + for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///A Solana transaction with additional compression information + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A Solana transaction with additional compression information", + /// "type": "object", + /// "properties": { + /// "compression_info": { + /// "type": "object", + /// "required": [ + /// "closedAccounts", + /// "openedAccounts" + /// ], + /// "properties": { + /// "closedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ClosedAccountWithOptionalTokenDataV2" + /// } + /// }, + /// "openedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenDataV2" + /// } + /// } + /// }, + /// "additionalProperties": false + /// }, + /// "transaction": { + /// "description": "An encoded confirmed transaction with status meta", + /// "type": "object" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2ResponseResult { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub compression_info: ::std::option::Option< + PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo, + >, + ///An encoded confirmed transaction with status meta + #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")] + pub transaction: ::serde_json::Map<::std::string::String, ::serde_json::Value>, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoV2ResponseResult { + fn default() -> Self { + Self { + compression_info: Default::default(), + transaction: Default::default(), + } + } + } + impl PostGetTransactionWithCompressionInfoV2ResponseResult { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2ResponseResult { + Default::default() + } + } + ///`PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "closedAccounts", + /// "openedAccounts" + /// ], + /// "properties": { + /// "closedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ClosedAccountWithOptionalTokenDataV2" + /// } + /// }, + /// "openedAccounts": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AccountWithOptionalTokenDataV2" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo { + #[serde(rename = "closedAccounts")] + pub closed_accounts: ::std::vec::Vec, + #[serde(rename = "openedAccounts")] + pub opened_accounts: ::std::vec::Vec, + } + impl PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo { + pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo { + Default::default() + } + } + ///`PostGetValidityProofBody` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getValidityProof" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "properties": { + /// "hashes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "newAddressesWithTrees": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AddressWithTree" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetValidityProofBody { + ///An ID to identify the request. + pub id: PostGetValidityProofBodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetValidityProofBodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetValidityProofBodyMethod, + pub params: PostGetValidityProofBodyParams, + } + impl PostGetValidityProofBody { + pub fn builder() -> builder::PostGetValidityProofBody { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofBodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetValidityProofBodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofBodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for PostGetValidityProofBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for PostGetValidityProofBodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofBodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetValidityProofBodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofBodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofBodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getValidityProof" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofBodyMethod { + #[serde(rename = "getValidityProof")] + GetValidityProof, + } + impl ::std::fmt::Display for PostGetValidityProofBodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetValidityProof => f.write_str("getValidityProof"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofBodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getValidityProof" => Ok(Self::GetValidityProof), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofBodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetValidityProofBodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "hashes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "newAddressesWithTrees": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AddressWithTree" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetValidityProofBodyParams { + #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] + pub hashes: ::std::vec::Vec, + #[serde( + rename = "newAddressesWithTrees", + default, + skip_serializing_if = "::std::vec::Vec::is_empty" + )] + pub new_addresses_with_trees: ::std::vec::Vec, + } + impl ::std::default::Default for PostGetValidityProofBodyParams { + fn default() -> Self { + Self { + hashes: Default::default(), + new_addresses_with_trees: Default::default(), + } + } + } + impl PostGetValidityProofBodyParams { + pub fn builder() -> builder::PostGetValidityProofBodyParams { + Default::default() + } + } + ///`PostGetValidityProofResponse` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/CompressedProofWithContext" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetValidityProofResponse { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetValidityProofResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetValidityProofResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetValidityProofResponse { + pub fn builder() -> builder::PostGetValidityProofResponse { + Default::default() + } + } + ///`PostGetValidityProofResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetValidityProofResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetValidityProofResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetValidityProofResponseError { + pub fn builder() -> builder::PostGetValidityProofResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetValidityProofResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetValidityProofResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetValidityProofResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/CompressedProofWithContext" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetValidityProofResponseResult { + pub context: Context, + pub value: CompressedProofWithContext, + } + impl PostGetValidityProofResponseResult { + pub fn builder() -> builder::PostGetValidityProofResponseResult { + Default::default() + } + } + ///`PostGetValidityProofV2Body` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc", + /// "method", + /// "params" + /// ], + /// "properties": { + /// "id": { + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "method": { + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getValidityProofV2" + /// ] + /// }, + /// "params": { + /// "type": "object", + /// "properties": { + /// "hashes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "newAddressesWithTrees": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AddressWithTree" + /// } + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetValidityProofV2Body { + ///An ID to identify the request. + pub id: PostGetValidityProofV2BodyId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetValidityProofV2BodyJsonrpc, + ///The name of the method to invoke. + pub method: PostGetValidityProofV2BodyMethod, + pub params: PostGetValidityProofV2BodyParams, + } + impl PostGetValidityProofV2Body { + pub fn builder() -> builder::PostGetValidityProofV2Body { + Default::default() + } + } + ///An ID to identify the request. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the request.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofV2BodyId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetValidityProofV2BodyId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofV2BodyId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofV2BodyId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofV2BodyJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetValidityProofV2BodyJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofV2BodyJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofV2BodyJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The name of the method to invoke. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name of the method to invoke.", + /// "type": "string", + /// "enum": [ + /// "getValidityProofV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofV2BodyMethod { + #[serde(rename = "getValidityProofV2")] + GetValidityProofV2, + } + impl ::std::fmt::Display for PostGetValidityProofV2BodyMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::GetValidityProofV2 => f.write_str("getValidityProofV2"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofV2BodyMethod { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "getValidityProofV2" => Ok(Self::GetValidityProofV2), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofV2BodyMethod { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetValidityProofV2BodyParams` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "hashes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Hash" + /// } + /// }, + /// "newAddressesWithTrees": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/AddressWithTree" + /// } + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetValidityProofV2BodyParams { + #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] + pub hashes: ::std::vec::Vec, + #[serde( + rename = "newAddressesWithTrees", + default, + skip_serializing_if = "::std::vec::Vec::is_empty" + )] + pub new_addresses_with_trees: ::std::vec::Vec, + } + impl ::std::default::Default for PostGetValidityProofV2BodyParams { + fn default() -> Self { + Self { + hashes: Default::default(), + new_addresses_with_trees: Default::default(), + } + } + } + impl PostGetValidityProofV2BodyParams { + pub fn builder() -> builder::PostGetValidityProofV2BodyParams { + Default::default() + } + } + ///`PostGetValidityProofV2Response` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "jsonrpc" + /// ], + /// "properties": { + /// "error": { + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// "id": { + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + /// }, + /// "jsonrpc": { + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + /// }, + /// "result": { + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/CompressedProofWithContextV2" + /// } + /// }, + /// "additionalProperties": false + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetValidityProofV2Response { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option, + ///An ID to identify the response. + pub id: PostGetValidityProofV2ResponseId, + ///The version of the JSON-RPC protocol. + pub jsonrpc: PostGetValidityProofV2ResponseJsonrpc, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub result: ::std::option::Option, + } + impl PostGetValidityProofV2Response { + pub fn builder() -> builder::PostGetValidityProofV2Response { + Default::default() + } + } + ///`PostGetValidityProofV2ResponseError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "code": { + /// "type": "integer" + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct PostGetValidityProofV2ResponseError { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub code: ::std::option::Option, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub message: ::std::option::Option<::std::string::String>, + } + impl ::std::default::Default for PostGetValidityProofV2ResponseError { + fn default() -> Self { + Self { + code: Default::default(), + message: Default::default(), + } + } + } + impl PostGetValidityProofV2ResponseError { + pub fn builder() -> builder::PostGetValidityProofV2ResponseError { + Default::default() + } + } + ///An ID to identify the response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An ID to identify the response.", + /// "type": "string", + /// "enum": [ + /// "test-account" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofV2ResponseId { + #[serde(rename = "test-account")] + TestAccount, + } + impl ::std::fmt::Display for PostGetValidityProofV2ResponseId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::TestAccount => f.write_str("test-account"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofV2ResponseId { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "test-account" => Ok(Self::TestAccount), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofV2ResponseId { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///The version of the JSON-RPC protocol. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The version of the JSON-RPC protocol.", + /// "type": "string", + /// "enum": [ + /// "2.0" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum PostGetValidityProofV2ResponseJsonrpc { + #[serde(rename = "2.0")] + X20, + } + impl ::std::fmt::Display for PostGetValidityProofV2ResponseJsonrpc { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::X20 => f.write_str("2.0"), + } + } + } + impl ::std::str::FromStr for PostGetValidityProofV2ResponseJsonrpc { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "2.0" => Ok(Self::X20), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> + for PostGetValidityProofV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> + for PostGetValidityProofV2ResponseJsonrpc { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///`PostGetValidityProofV2ResponseResult` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "context", + /// "value" + /// ], + /// "properties": { + /// "context": { + /// "$ref": "#/components/schemas/Context" + /// }, + /// "value": { + /// "$ref": "#/components/schemas/CompressedProofWithContextV2" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct PostGetValidityProofV2ResponseResult { + pub context: Context, + pub value: CompressedProofWithContextV2, + } + impl PostGetValidityProofV2ResponseResult { + pub fn builder() -> builder::PostGetValidityProofV2ResponseResult { + Default::default() + } + } + ///`QueueInfo` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "queue", + /// "queueSize", + /// "queueType", + /// "tree" + /// ], + /// "properties": { + /// "queue": { + /// "type": "string" + /// }, + /// "queueSize": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "queueType": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// }, + /// "tree": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct QueueInfo { + pub queue: ::std::string::String, + #[serde(rename = "queueSize")] + pub queue_size: u64, + #[serde(rename = "queueType")] + pub queue_type: u8, + pub tree: ::std::string::String, + } + impl QueueInfo { + pub fn builder() -> builder::QueueInfo { + Default::default() + } + } + ///Parameters for requesting queue elements + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for requesting queue elements", + /// "type": "object", + /// "required": [ + /// "limit" + /// ], + /// "properties": { + /// "limit": { + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// }, + /// "startIndex": { + /// "type": [ + /// "integer", + /// "null" + /// ], + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "zkpBatchSize": { + /// "type": [ + /// "integer", + /// "null" + /// ], + /// "format": "uint16", + /// "minimum": 0.0 + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct QueueRequest { + pub limit: u16, + #[serde( + rename = "startIndex", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub start_index: ::std::option::Option, + #[serde( + rename = "zkpBatchSize", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub zkp_batch_size: ::std::option::Option, + } + impl QueueRequest { + pub fn builder() -> builder::QueueRequest { + Default::default() + } + } + ///`RootIndex` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "proveByIndex", + /// "rootIndex" + /// ], + /// "properties": { + /// "proveByIndex": { + /// "type": "boolean" + /// }, + /// "rootIndex": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct RootIndex { + #[serde(rename = "proveByIndex")] + pub prove_by_index: bool, + #[serde(rename = "rootIndex")] + pub root_index: u64, + } + impl RootIndex { + pub fn builder() -> builder::RootIndex { + Default::default() + } + } + ///A Solana public key represented as a base58 string. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A Solana public key represented as a base58 string.", + /// "default": "111FJo4zLAGU9nzTWa6EnbV4VAmtG4FR8kcokrtZYr", + /// "examples": [ + /// "111FJo4zLAGU9nzTWa6EnbV4VAmtG4FR8kcokrtZYr" + /// ], + /// "type": "string" + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + #[serde(transparent)] + pub struct SerializablePubkey(pub ::std::string::String); + impl ::std::ops::Deref for SerializablePubkey { + type Target = ::std::string::String; + fn deref(&self) -> &::std::string::String { + &self.0 + } + } + impl ::std::convert::From for ::std::string::String { + fn from(value: SerializablePubkey) -> Self { + value.0 + } + } + impl ::std::convert::From<::std::string::String> for SerializablePubkey { + fn from(value: ::std::string::String) -> Self { + Self(value) + } + } + impl ::std::str::FromStr for SerializablePubkey { + type Err = ::std::convert::Infallible; + fn from_str(value: &str) -> ::std::result::Result { + Ok(Self(value.to_string())) + } + } + impl ::std::fmt::Display for SerializablePubkey { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + self.0.fmt(f) + } + } + ///A Solana transaction signature. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A Solana transaction signature.", + /// "default": "5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c", + /// "examples": [ + /// "5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c" + /// ], + /// "type": "string" + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + #[serde(transparent)] + pub struct SerializableSignature(pub ::std::string::String); + impl ::std::ops::Deref for SerializableSignature { + type Target = ::std::string::String; + fn deref(&self) -> &::std::string::String { + &self.0 + } + } + impl ::std::convert::From for ::std::string::String { + fn from(value: SerializableSignature) -> Self { + value.0 + } + } + impl ::std::convert::From<::std::string::String> for SerializableSignature { + fn from(value: ::std::string::String) -> Self { + Self(value) + } + } + impl ::std::str::FromStr for SerializableSignature { + type Err = ::std::convert::Infallible; + fn from_str(value: &str) -> ::std::result::Result { + Ok(Self(value.to_string())) + } + } + impl ::std::fmt::Display for SerializableSignature { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + self.0.fmt(f) + } + } + ///`SignatureInfo` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "blockTime", + /// "signature", + /// "slot" + /// ], + /// "properties": { + /// "blockTime": { + /// "$ref": "#/components/schemas/UnixTimestamp" + /// }, + /// "signature": { + /// "$ref": "#/components/schemas/SerializableSignature" + /// }, + /// "slot": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct SignatureInfo { + #[serde(rename = "blockTime")] + pub block_time: UnixTimestamp, + pub signature: SerializableSignature, + pub slot: UnsignedInteger, + } + impl SignatureInfo { + pub fn builder() -> builder::SignatureInfo { + Default::default() + } + } + ///`SignatureInfoList` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SignatureInfo" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct SignatureInfoList { + pub items: ::std::vec::Vec, + } + impl SignatureInfoList { + pub fn builder() -> builder::SignatureInfoList { + Default::default() + } + } + ///`SignatureInfoListWithError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SignatureInfoWithError" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct SignatureInfoListWithError { + pub items: ::std::vec::Vec, + } + impl SignatureInfoListWithError { + pub fn builder() -> builder::SignatureInfoListWithError { + Default::default() + } + } + ///`SignatureInfoWithError` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "blockTime", + /// "signature", + /// "slot" + /// ], + /// "properties": { + /// "blockTime": { + /// "$ref": "#/components/schemas/UnixTimestamp" + /// }, + /// "error": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "signature": { + /// "$ref": "#/components/schemas/SerializableSignature" + /// }, + /// "slot": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct SignatureInfoWithError { + #[serde(rename = "blockTime")] + pub block_time: UnixTimestamp, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub error: ::std::option::Option<::std::string::String>, + pub signature: SerializableSignature, + pub slot: UnsignedInteger, + } + impl SignatureInfoWithError { + pub fn builder() -> builder::SignatureInfoWithError { + Default::default() + } + } + ///Nested Solana account fields (matches getAccountInfo shape) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Nested Solana account fields (matches getAccountInfo shape)", + /// "type": "object", + /// "required": [ + /// "data", + /// "executable", + /// "lamports", + /// "owner", + /// "rentEpoch", + /// "space" + /// ], + /// "properties": { + /// "data": { + /// "$ref": "#/components/schemas/Base64String" + /// }, + /// "executable": { + /// "type": "boolean" + /// }, + /// "lamports": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "rentEpoch": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "space": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct SolanaAccountData { + pub data: Base64String, + pub executable: bool, + pub lamports: UnsignedInteger, + pub owner: SerializablePubkey, + #[serde(rename = "rentEpoch")] + pub rent_epoch: UnsignedInteger, + pub space: UnsignedInteger, + } + impl SolanaAccountData { + pub fn builder() -> builder::SolanaAccountData { + Default::default() + } + } + ///State queue data with shared tree nodes for output and input queues + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "State queue data with shared tree nodes for output and input queues", + /// "type": "object", + /// "required": [ + /// "initialRoot", + /// "rootSeq" + /// ], + /// "properties": { + /// "initialRoot": { + /// "$ref": "#/components/schemas/Hash" + /// }, + /// "inputQueue": { + /// "$ref": "#/components/schemas/InputQueueData" + /// }, + /// "nodes": { + /// "description": "Shared deduplicated tree nodes for state queues (output + input)", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Node" + /// } + /// }, + /// "outputQueue": { + /// "$ref": "#/components/schemas/OutputQueueData" + /// }, + /// "rootSeq": { + /// "description": "Sequence number of the root", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct StateQueueData { + #[serde(rename = "initialRoot")] + pub initial_root: Hash, + #[serde( + rename = "inputQueue", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub input_queue: ::std::option::Option, + ///Shared deduplicated tree nodes for state queues (output + input) + #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] + pub nodes: ::std::vec::Vec, + #[serde( + rename = "outputQueue", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub output_queue: ::std::option::Option, + ///Sequence number of the root + #[serde(rename = "rootSeq")] + pub root_seq: u64, + } + impl StateQueueData { + pub fn builder() -> builder::StateQueueData { + Default::default() + } + } + ///`TokenAccount` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "account", + /// "tokenData" + /// ], + /// "properties": { + /// "account": { + /// "$ref": "#/components/schemas/Account" + /// }, + /// "tokenData": { + /// "$ref": "#/components/schemas/TokenData" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct TokenAccount { + pub account: Account, + #[serde(rename = "tokenData")] + pub token_data: TokenData, + } + impl TokenAccount { + pub fn builder() -> builder::TokenAccount { + Default::default() + } + } + ///`TokenAccountBalance` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "amount" + /// ], + /// "properties": { + /// "amount": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct TokenAccountBalance { + pub amount: UnsignedInteger, + } + impl TokenAccountBalance { + pub fn builder() -> builder::TokenAccountBalance { + Default::default() + } + } + ///`TokenAccountInterface` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/AccountInterface" + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "tokenData" + /// ], + /// "properties": { + /// "tokenData": { + /// "$ref": "#/components/schemas/TokenData" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TokenAccountInterface { + pub account: SolanaAccountData, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cold: ::std::option::Option, + pub key: SerializablePubkey, + #[serde(rename = "tokenData")] + pub token_data: TokenData, + } + impl TokenAccountInterface { + pub fn builder() -> builder::TokenAccountInterface { + Default::default() + } + } + ///`TokenAccountList` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "cursor": { + /// "$ref": "#/components/schemas/Base58String" + /// }, + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/TokenAccount" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TokenAccountList { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub items: ::std::vec::Vec, + } + impl TokenAccountList { + pub fn builder() -> builder::TokenAccountList { + Default::default() + } + } + ///`TokenAccountListV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "cursor": { + /// "$ref": "#/components/schemas/Base58String" + /// }, + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/TokenAccountV2" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TokenAccountListV2 { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub items: ::std::vec::Vec, + } + impl TokenAccountListV2 { + pub fn builder() -> builder::TokenAccountListV2 { + Default::default() + } + } + ///`TokenAccountV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "account", + /// "tokenData" + /// ], + /// "properties": { + /// "account": { + /// "$ref": "#/components/schemas/AccountV2" + /// }, + /// "tokenData": { + /// "$ref": "#/components/schemas/TokenData" + /// } + /// }, + /// "additionalProperties": false + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(deny_unknown_fields)] + pub struct TokenAccountV2 { + pub account: AccountV2, + #[serde(rename = "tokenData")] + pub token_data: TokenData, + } + impl TokenAccountV2 { + pub fn builder() -> builder::TokenAccountV2 { + Default::default() + } + } + ///`TokenBalance` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "balance", + /// "mint" + /// ], + /// "properties": { + /// "balance": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "mint": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TokenBalance { + pub balance: UnsignedInteger, + pub mint: SerializablePubkey, + } + impl TokenBalance { + pub fn builder() -> builder::TokenBalance { + Default::default() + } + } + ///`TokenBalanceList` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "token_balances" + /// ], + /// "properties": { + /// "cursor": { + /// "$ref": "#/components/schemas/Base58String" + /// }, + /// "token_balances": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/TokenBalance" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TokenBalanceList { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub token_balances: ::std::vec::Vec, + } + impl TokenBalanceList { + pub fn builder() -> builder::TokenBalanceList { + Default::default() + } + } + ///`TokenBalanceListV2` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "cursor": { + /// "$ref": "#/components/schemas/Base58String" + /// }, + /// "items": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/TokenBalance" + /// } + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TokenBalanceListV2 { + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub cursor: ::std::option::Option, + pub items: ::std::vec::Vec, + } + impl TokenBalanceListV2 { + pub fn builder() -> builder::TokenBalanceListV2 { + Default::default() + } + } + ///`TokenData` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "amount", + /// "mint", + /// "owner", + /// "state" + /// ], + /// "properties": { + /// "amount": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "delegate": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "mint": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "owner": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/AccountState" + /// }, + /// "tlv": { + /// "$ref": "#/components/schemas/Base64String" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TokenData { + pub amount: UnsignedInteger, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub delegate: ::std::option::Option, + pub mint: SerializablePubkey, + pub owner: SerializablePubkey, + pub state: AccountState, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub tlv: ::std::option::Option, + } + impl TokenData { + pub fn builder() -> builder::TokenData { + Default::default() + } + } + ///`TreeContextInfo` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "queue", + /// "tree", + /// "treeType" + /// ], + /// "properties": { + /// "cpiContext": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "queue": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "tree": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "treeType": { + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TreeContextInfo { + #[serde( + rename = "cpiContext", + default, + skip_serializing_if = "::std::option::Option::is_none" + )] + pub cpi_context: ::std::option::Option, + pub queue: SerializablePubkey, + pub tree: SerializablePubkey, + #[serde(rename = "treeType")] + pub tree_type: u16, + } + impl TreeContextInfo { + pub fn builder() -> builder::TreeContextInfo { + Default::default() + } + } + ///Merkle tree info for compressed accounts + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Merkle tree info for compressed accounts", + /// "type": "object", + /// "required": [ + /// "queue", + /// "slotCreated", + /// "tree", + /// "treeType" + /// ], + /// "properties": { + /// "queue": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "seq": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "slotCreated": { + /// "$ref": "#/components/schemas/UnsignedInteger" + /// }, + /// "tree": { + /// "$ref": "#/components/schemas/SerializablePubkey" + /// }, + /// "treeType": { + /// "$ref": "#/components/schemas/TreeType" + /// } + /// } + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + pub struct TreeInfo { + pub queue: SerializablePubkey, + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub seq: ::std::option::Option, + #[serde(rename = "slotCreated")] + pub slot_created: UnsignedInteger, + pub tree: SerializablePubkey, + #[serde(rename = "treeType")] + pub tree_type: TreeType, + } + impl TreeInfo { + pub fn builder() -> builder::TreeInfo { + Default::default() + } + } + /**Tree type enum matching light-protocol's TreeType. +Values match light-compressed-account::TreeType: StateV1=1, StateV2=3*/ + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Tree type enum matching light-protocol's TreeType.\nValues match light-compressed-account::TreeType: StateV1=1, StateV2=3", + /// "type": "string", + /// "enum": [ + /// "stateV1", + /// "stateV2" + /// ] + ///} + /// ``` + ///
+ #[derive( + ::serde::Deserialize, + ::serde::Serialize, + Clone, + Copy, + Debug, + Eq, + Hash, + Ord, + PartialEq, + PartialOrd + )] + pub enum TreeType { + #[serde(rename = "stateV1")] + StateV1, + #[serde(rename = "stateV2")] + StateV2, + } + impl ::std::fmt::Display for TreeType { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match *self { + Self::StateV1 => f.write_str("stateV1"), + Self::StateV2 => f.write_str("stateV2"), + } + } + } + impl ::std::str::FromStr for TreeType { + type Err = self::error::ConversionError; + fn from_str( + value: &str, + ) -> ::std::result::Result { + match value { + "stateV1" => Ok(Self::StateV1), + "stateV2" => Ok(Self::StateV2), + _ => Err("invalid value".into()), + } + } + } + impl ::std::convert::TryFrom<&str> for TreeType { + type Error = self::error::ConversionError; + fn try_from( + value: &str, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<&::std::string::String> for TreeType { + type Error = self::error::ConversionError; + fn try_from( + value: &::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom<::std::string::String> for TreeType { + type Error = self::error::ConversionError; + fn try_from( + value: ::std::string::String, + ) -> ::std::result::Result { + value.parse() + } + } + ///An Unix timestamp (seconds) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "An Unix timestamp (seconds)", + /// "default": 1714081554, + /// "examples": [ + /// 1714081554 + /// ], + /// "type": "integer" + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(transparent)] + pub struct UnixTimestamp(pub i64); + impl ::std::ops::Deref for UnixTimestamp { + type Target = i64; + fn deref(&self) -> &i64 { + &self.0 + } + } + impl ::std::convert::From for i64 { + fn from(value: UnixTimestamp) -> Self { + value.0 + } + } + impl ::std::convert::From for UnixTimestamp { + fn from(value: i64) -> Self { + Self(value) + } + } + impl ::std::str::FromStr for UnixTimestamp { + type Err = ::Err; + fn from_str(value: &str) -> ::std::result::Result { + Ok(Self(value.parse()?)) + } + } + impl ::std::convert::TryFrom<&str> for UnixTimestamp { + type Error = ::Err; + fn try_from(value: &str) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom for UnixTimestamp { + type Error = ::Err; + fn try_from(value: String) -> ::std::result::Result { + value.parse() + } + } + impl ::std::fmt::Display for UnixTimestamp { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + self.0.fmt(f) + } + } + ///`UnsignedInteger` + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "default": 100, + /// "examples": [ + /// 100 + /// ], + /// "type": "integer", + /// "format": "uint64" + ///} + /// ``` + ///
+ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] + #[serde(transparent)] + pub struct UnsignedInteger(pub u64); + impl ::std::ops::Deref for UnsignedInteger { + type Target = u64; + fn deref(&self) -> &u64 { + &self.0 + } + } + impl ::std::convert::From for u64 { + fn from(value: UnsignedInteger) -> Self { + value.0 + } + } + impl ::std::convert::From for UnsignedInteger { + fn from(value: u64) -> Self { + Self(value) + } + } + impl ::std::str::FromStr for UnsignedInteger { + type Err = ::Err; + fn from_str(value: &str) -> ::std::result::Result { + Ok(Self(value.parse()?)) + } + } + impl ::std::convert::TryFrom<&str> for UnsignedInteger { + type Error = ::Err; + fn try_from(value: &str) -> ::std::result::Result { + value.parse() + } + } + impl ::std::convert::TryFrom for UnsignedInteger { + type Error = ::Err; + fn try_from(value: String) -> ::std::result::Result { + value.parse() + } + } + impl ::std::fmt::Display for UnsignedInteger { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + self.0.fmt(f) + } + } + /// Types for composing complex structures. + pub mod builder { + #[derive(Clone, Debug)] + pub struct Account { + address: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + data: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + hash: ::std::result::Result, + lamports: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + leaf_index: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + seq: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + slot_created: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + tree: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for Account { + fn default() -> Self { + Self { + address: Ok(Default::default()), + data: Ok(Default::default()), + hash: Err("no value supplied for hash".to_string()), + lamports: Err("no value supplied for lamports".to_string()), + leaf_index: Err("no value supplied for leaf_index".to_string()), + owner: Err("no value supplied for owner".to_string()), + seq: Ok(Default::default()), + slot_created: Err("no value supplied for slot_created".to_string()), + tree: Err("no value supplied for tree".to_string()), + } + } + } + impl Account { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.data = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for data: {e}") + }); + self + } + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + pub fn lamports(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.lamports = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for lamports: {e}") + }); + self + } + pub fn leaf_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.leaf_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaf_index: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + pub fn seq(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.seq = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for seq: {e}") + }); + self + } + pub fn slot_created(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.slot_created = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for slot_created: {e}") + }); + self + } + pub fn tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::Account { + type Error = super::error::ConversionError; + fn try_from( + value: Account, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + data: value.data?, + hash: value.hash?, + lamports: value.lamports?, + leaf_index: value.leaf_index?, + owner: value.owner?, + seq: value.seq?, + slot_created: value.slot_created?, + tree: value.tree?, + }) + } + } + impl ::std::convert::From for Account { + fn from(value: super::Account) -> Self { + Self { + address: Ok(value.address), + data: Ok(value.data), + hash: Ok(value.hash), + lamports: Ok(value.lamports), + leaf_index: Ok(value.leaf_index), + owner: Ok(value.owner), + seq: Ok(value.seq), + slot_created: Ok(value.slot_created), + tree: Ok(value.tree), + } + } + } + #[derive(Clone, Debug)] + pub struct AccountContext { + in_output_queue: ::std::result::Result, + nullified_in_tree: ::std::result::Result, + nullifier: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + nullifier_queue_index: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + queue: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + spent: ::std::result::Result, + tree_type: ::std::result::Result, + tx_hash: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for AccountContext { + fn default() -> Self { + Self { + in_output_queue: Err( + "no value supplied for in_output_queue".to_string(), + ), + nullified_in_tree: Err( + "no value supplied for nullified_in_tree".to_string(), + ), + nullifier: Ok(Default::default()), + nullifier_queue_index: Ok(Default::default()), + queue: Err("no value supplied for queue".to_string()), + spent: Err("no value supplied for spent".to_string()), + tree_type: Err("no value supplied for tree_type".to_string()), + tx_hash: Ok(Default::default()), + } + } + } + impl AccountContext { + pub fn in_output_queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.in_output_queue = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for in_output_queue: {e}" + ) + }); + self + } + pub fn nullified_in_tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.nullified_in_tree = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for nullified_in_tree: {e}" + ) + }); + self + } + pub fn nullifier(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.nullifier = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for nullifier: {e}") + }); + self + } + pub fn nullifier_queue_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.nullifier_queue_index = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for nullifier_queue_index: {e}" + ) + }); + self + } + pub fn queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queue: {e}") + }); + self + } + pub fn spent(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.spent = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for spent: {e}") + }); + self + } + pub fn tree_type(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree_type = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree_type: {e}") + }); + self + } + pub fn tx_hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.tx_hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tx_hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AccountContext { + type Error = super::error::ConversionError; + fn try_from( + value: AccountContext, + ) -> ::std::result::Result { + Ok(Self { + in_output_queue: value.in_output_queue?, + nullified_in_tree: value.nullified_in_tree?, + nullifier: value.nullifier?, + nullifier_queue_index: value.nullifier_queue_index?, + queue: value.queue?, + spent: value.spent?, + tree_type: value.tree_type?, + tx_hash: value.tx_hash?, + }) + } + } + impl ::std::convert::From for AccountContext { + fn from(value: super::AccountContext) -> Self { + Self { + in_output_queue: Ok(value.in_output_queue), + nullified_in_tree: Ok(value.nullified_in_tree), + nullifier: Ok(value.nullifier), + nullifier_queue_index: Ok(value.nullifier_queue_index), + queue: Ok(value.queue), + spent: Ok(value.spent), + tree_type: Ok(value.tree_type), + tx_hash: Ok(value.tx_hash), + } + } + } + #[derive(Clone, Debug)] + pub struct AccountData { + data: ::std::result::Result, + data_hash: ::std::result::Result, + discriminator: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + } + impl ::std::default::Default for AccountData { + fn default() -> Self { + Self { + data: Err("no value supplied for data".to_string()), + data_hash: Err("no value supplied for data_hash".to_string()), + discriminator: Err("no value supplied for discriminator".to_string()), + } + } + } + impl AccountData { + pub fn data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.data = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for data: {e}") + }); + self + } + pub fn data_hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.data_hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for data_hash: {e}") + }); + self + } + pub fn discriminator(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.discriminator = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for discriminator: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AccountData { + type Error = super::error::ConversionError; + fn try_from( + value: AccountData, + ) -> ::std::result::Result { + Ok(Self { + data: value.data?, + data_hash: value.data_hash?, + discriminator: value.discriminator?, + }) + } + } + impl ::std::convert::From for AccountData { + fn from(value: super::AccountData) -> Self { + Self { + data: Ok(value.data), + data_hash: Ok(value.data_hash), + discriminator: Ok(value.discriminator), + } + } + } + #[derive(Clone, Debug)] + pub struct AccountInterface { + account: ::std::result::Result< + super::SolanaAccountData, + ::std::string::String, + >, + cold: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + key: ::std::result::Result, + } + impl ::std::default::Default for AccountInterface { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + cold: Ok(Default::default()), + key: Err("no value supplied for key".to_string()), + } + } + } + impl AccountInterface { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn cold(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cold = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cold: {e}") + }); + self + } + pub fn key(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.key = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for key: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AccountInterface { + type Error = super::error::ConversionError; + fn try_from( + value: AccountInterface, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + cold: value.cold?, + key: value.key?, + }) + } + } + impl ::std::convert::From for AccountInterface { + fn from(value: super::AccountInterface) -> Self { + Self { + account: Ok(value.account), + cold: Ok(value.cold), + key: Ok(value.key), + } + } + } + #[derive(Clone, Debug)] + pub struct AccountList { + items: ::std::result::Result< + ::std::vec::Vec<::std::option::Option>, + ::std::string::String, + >, + } + impl ::std::default::Default for AccountList { + fn default() -> Self { + Self { + items: Err("no value supplied for items".to_string()), + } + } + } + impl AccountList { + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec<::std::option::Option>, + >, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AccountList { + type Error = super::error::ConversionError; + fn try_from( + value: AccountList, + ) -> ::std::result::Result { + Ok(Self { items: value.items? }) + } + } + impl ::std::convert::From for AccountList { + fn from(value: super::AccountList) -> Self { + Self { items: Ok(value.items) } + } + } + #[derive(Clone, Debug)] + pub struct AccountListV2 { + items: ::std::result::Result< + ::std::vec::Vec<::std::option::Option>, + ::std::string::String, + >, + } + impl ::std::default::Default for AccountListV2 { + fn default() -> Self { + Self { + items: Err("no value supplied for items".to_string()), + } + } + } + impl AccountListV2 { + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec<::std::option::Option>, + >, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AccountListV2 { + type Error = super::error::ConversionError; + fn try_from( + value: AccountListV2, + ) -> ::std::result::Result { + Ok(Self { items: value.items? }) + } + } + impl ::std::convert::From for AccountListV2 { + fn from(value: super::AccountListV2) -> Self { + Self { items: Ok(value.items) } + } + } + #[derive(Clone, Debug)] + pub struct AccountProofInputs { + hash: ::std::result::Result<::std::string::String, ::std::string::String>, + leaf_index: ::std::result::Result, + merkle_context: ::std::result::Result< + super::MerkleContextV2, + ::std::string::String, + >, + root: ::std::result::Result<::std::string::String, ::std::string::String>, + root_index: ::std::result::Result, + } + impl ::std::default::Default for AccountProofInputs { + fn default() -> Self { + Self { + hash: Err("no value supplied for hash".to_string()), + leaf_index: Err("no value supplied for leaf_index".to_string()), + merkle_context: Err( + "no value supplied for merkle_context".to_string(), + ), + root: Err("no value supplied for root".to_string()), + root_index: Err("no value supplied for root_index".to_string()), + } + } + } + impl AccountProofInputs { + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::string::String>, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + pub fn leaf_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.leaf_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaf_index: {e}") + }); + self + } + pub fn merkle_context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.merkle_context = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for merkle_context: {e}" + ) + }); + self + } + pub fn root(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::string::String>, + T::Error: ::std::fmt::Display, + { + self.root = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root: {e}") + }); + self + } + pub fn root_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_index: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AccountProofInputs { + type Error = super::error::ConversionError; + fn try_from( + value: AccountProofInputs, + ) -> ::std::result::Result { + Ok(Self { + hash: value.hash?, + leaf_index: value.leaf_index?, + merkle_context: value.merkle_context?, + root: value.root?, + root_index: value.root_index?, + }) + } + } + impl ::std::convert::From for AccountProofInputs { + fn from(value: super::AccountProofInputs) -> Self { + Self { + hash: Ok(value.hash), + leaf_index: Ok(value.leaf_index), + merkle_context: Ok(value.merkle_context), + root: Ok(value.root), + root_index: Ok(value.root_index), + } + } + } + #[derive(Clone, Debug)] + pub struct AccountV2 { + address: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + data: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + hash: ::std::result::Result, + lamports: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + leaf_index: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + merkle_context: ::std::result::Result< + super::MerkleContextV2, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + prove_by_index: ::std::result::Result, + seq: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + slot_created: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + } + impl ::std::default::Default for AccountV2 { + fn default() -> Self { + Self { + address: Ok(Default::default()), + data: Ok(Default::default()), + hash: Err("no value supplied for hash".to_string()), + lamports: Err("no value supplied for lamports".to_string()), + leaf_index: Err("no value supplied for leaf_index".to_string()), + merkle_context: Err( + "no value supplied for merkle_context".to_string(), + ), + owner: Err("no value supplied for owner".to_string()), + prove_by_index: Err( + "no value supplied for prove_by_index".to_string(), + ), + seq: Ok(Default::default()), + slot_created: Err("no value supplied for slot_created".to_string()), + } + } + } + impl AccountV2 { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.data = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for data: {e}") + }); + self + } + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + pub fn lamports(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.lamports = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for lamports: {e}") + }); + self + } + pub fn leaf_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.leaf_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaf_index: {e}") + }); + self + } + pub fn merkle_context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.merkle_context = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for merkle_context: {e}" + ) + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + pub fn prove_by_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.prove_by_index = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for prove_by_index: {e}" + ) + }); + self + } + pub fn seq(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.seq = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for seq: {e}") + }); + self + } + pub fn slot_created(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.slot_created = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for slot_created: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AccountV2 { + type Error = super::error::ConversionError; + fn try_from( + value: AccountV2, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + data: value.data?, + hash: value.hash?, + lamports: value.lamports?, + leaf_index: value.leaf_index?, + merkle_context: value.merkle_context?, + owner: value.owner?, + prove_by_index: value.prove_by_index?, + seq: value.seq?, + slot_created: value.slot_created?, + }) + } + } + impl ::std::convert::From for AccountV2 { + fn from(value: super::AccountV2) -> Self { + Self { + address: Ok(value.address), + data: Ok(value.data), + hash: Ok(value.hash), + lamports: Ok(value.lamports), + leaf_index: Ok(value.leaf_index), + merkle_context: Ok(value.merkle_context), + owner: Ok(value.owner), + prove_by_index: Ok(value.prove_by_index), + seq: Ok(value.seq), + slot_created: Ok(value.slot_created), + } + } + } + #[derive(Clone, Debug)] + pub struct AccountWithContext { + account: ::std::result::Result, + context: ::std::result::Result, + } + impl ::std::default::Default for AccountWithContext { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + context: Err("no value supplied for context".to_string()), + } + } + } + impl AccountWithContext { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AccountWithContext { + type Error = super::error::ConversionError; + fn try_from( + value: AccountWithContext, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + context: value.context?, + }) + } + } + impl ::std::convert::From for AccountWithContext { + fn from(value: super::AccountWithContext) -> Self { + Self { + account: Ok(value.account), + context: Ok(value.context), + } + } + } + #[derive(Clone, Debug)] + pub struct AccountWithOptionalTokenData { + account: ::std::result::Result, + optional_token_data: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for AccountWithOptionalTokenData { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + optional_token_data: Ok(Default::default()), + } + } + } + impl AccountWithOptionalTokenData { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn optional_token_data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.optional_token_data = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for optional_token_data: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom + for super::AccountWithOptionalTokenData { + type Error = super::error::ConversionError; + fn try_from( + value: AccountWithOptionalTokenData, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + optional_token_data: value.optional_token_data?, + }) + } + } + impl ::std::convert::From + for AccountWithOptionalTokenData { + fn from(value: super::AccountWithOptionalTokenData) -> Self { + Self { + account: Ok(value.account), + optional_token_data: Ok(value.optional_token_data), + } + } + } + #[derive(Clone, Debug)] + pub struct AccountWithOptionalTokenDataV2 { + account: ::std::result::Result, + optional_token_data: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for AccountWithOptionalTokenDataV2 { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + optional_token_data: Ok(Default::default()), + } + } + } + impl AccountWithOptionalTokenDataV2 { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn optional_token_data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.optional_token_data = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for optional_token_data: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom + for super::AccountWithOptionalTokenDataV2 { + type Error = super::error::ConversionError; + fn try_from( + value: AccountWithOptionalTokenDataV2, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + optional_token_data: value.optional_token_data?, + }) + } + } + impl ::std::convert::From + for AccountWithOptionalTokenDataV2 { + fn from(value: super::AccountWithOptionalTokenDataV2) -> Self { + Self { + account: Ok(value.account), + optional_token_data: Ok(value.optional_token_data), + } + } + } + #[derive(Clone, Debug)] + pub struct AddressProofInputs { + address: ::std::result::Result<::std::string::String, ::std::string::String>, + merkle_context: ::std::result::Result< + super::MerkleContextV2, + ::std::string::String, + >, + root: ::std::result::Result<::std::string::String, ::std::string::String>, + root_index: ::std::result::Result, + } + impl ::std::default::Default for AddressProofInputs { + fn default() -> Self { + Self { + address: Err("no value supplied for address".to_string()), + merkle_context: Err( + "no value supplied for merkle_context".to_string(), + ), + root: Err("no value supplied for root".to_string()), + root_index: Err("no value supplied for root_index".to_string()), + } + } + } + impl AddressProofInputs { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::string::String>, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn merkle_context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.merkle_context = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for merkle_context: {e}" + ) + }); + self + } + pub fn root(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::string::String>, + T::Error: ::std::fmt::Display, + { + self.root = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root: {e}") + }); + self + } + pub fn root_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_index: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AddressProofInputs { + type Error = super::error::ConversionError; + fn try_from( + value: AddressProofInputs, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + merkle_context: value.merkle_context?, + root: value.root?, + root_index: value.root_index?, + }) + } + } + impl ::std::convert::From for AddressProofInputs { + fn from(value: super::AddressProofInputs) -> Self { + Self { + address: Ok(value.address), + merkle_context: Ok(value.merkle_context), + root: Ok(value.root), + root_index: Ok(value.root_index), + } + } + } + #[derive(Clone, Debug)] + pub struct AddressQueueData { + addresses: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + initial_root: ::std::result::Result, + leaves_hash_chains: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + low_element_indices: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + low_element_next_indices: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + low_element_next_values: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + low_element_values: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + nodes: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + queue_indices: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + root_seq: ::std::result::Result, + start_index: ::std::result::Result, + subtrees: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for AddressQueueData { + fn default() -> Self { + Self { + addresses: Err("no value supplied for addresses".to_string()), + initial_root: Err("no value supplied for initial_root".to_string()), + leaves_hash_chains: Err( + "no value supplied for leaves_hash_chains".to_string(), + ), + low_element_indices: Err( + "no value supplied for low_element_indices".to_string(), + ), + low_element_next_indices: Err( + "no value supplied for low_element_next_indices".to_string(), + ), + low_element_next_values: Err( + "no value supplied for low_element_next_values".to_string(), + ), + low_element_values: Err( + "no value supplied for low_element_values".to_string(), + ), + nodes: Err("no value supplied for nodes".to_string()), + queue_indices: Err( + "no value supplied for queue_indices".to_string(), + ), + root_seq: Err("no value supplied for root_seq".to_string()), + start_index: Err("no value supplied for start_index".to_string()), + subtrees: Err("no value supplied for subtrees".to_string()), + } + } + } + impl AddressQueueData { + pub fn addresses(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.addresses = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for addresses: {e}") + }); + self + } + pub fn initial_root(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.initial_root = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for initial_root: {e}") + }); + self + } + pub fn leaves_hash_chains(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.leaves_hash_chains = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for leaves_hash_chains: {e}" + ) + }); + self + } + pub fn low_element_indices(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.low_element_indices = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for low_element_indices: {e}" + ) + }); + self + } + pub fn low_element_next_indices(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.low_element_next_indices = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for low_element_next_indices: {e}" + ) + }); + self + } + pub fn low_element_next_values(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.low_element_next_values = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for low_element_next_values: {e}" + ) + }); + self + } + pub fn low_element_values(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.low_element_values = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for low_element_values: {e}" + ) + }); + self + } + pub fn nodes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.nodes = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for nodes: {e}") + }); + self + } + pub fn queue_indices(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.queue_indices = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queue_indices: {e}") + }); + self + } + pub fn root_seq(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root_seq = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_seq: {e}") + }); + self + } + pub fn start_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.start_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for start_index: {e}") + }); + self + } + pub fn subtrees(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.subtrees = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for subtrees: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AddressQueueData { + type Error = super::error::ConversionError; + fn try_from( + value: AddressQueueData, + ) -> ::std::result::Result { + Ok(Self { + addresses: value.addresses?, + initial_root: value.initial_root?, + leaves_hash_chains: value.leaves_hash_chains?, + low_element_indices: value.low_element_indices?, + low_element_next_indices: value.low_element_next_indices?, + low_element_next_values: value.low_element_next_values?, + low_element_values: value.low_element_values?, + nodes: value.nodes?, + queue_indices: value.queue_indices?, + root_seq: value.root_seq?, + start_index: value.start_index?, + subtrees: value.subtrees?, + }) + } + } + impl ::std::convert::From for AddressQueueData { + fn from(value: super::AddressQueueData) -> Self { + Self { + addresses: Ok(value.addresses), + initial_root: Ok(value.initial_root), + leaves_hash_chains: Ok(value.leaves_hash_chains), + low_element_indices: Ok(value.low_element_indices), + low_element_next_indices: Ok(value.low_element_next_indices), + low_element_next_values: Ok(value.low_element_next_values), + low_element_values: Ok(value.low_element_values), + nodes: Ok(value.nodes), + queue_indices: Ok(value.queue_indices), + root_seq: Ok(value.root_seq), + start_index: Ok(value.start_index), + subtrees: Ok(value.subtrees), + } + } + } + #[derive(Clone, Debug)] + pub struct AddressWithTree { + address: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + tree: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for AddressWithTree { + fn default() -> Self { + Self { + address: Err("no value supplied for address".to_string()), + tree: Err("no value supplied for tree".to_string()), + } + } + } + impl AddressWithTree { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::AddressWithTree { + type Error = super::error::ConversionError; + fn try_from( + value: AddressWithTree, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + tree: value.tree?, + }) + } + } + impl ::std::convert::From for AddressWithTree { + fn from(value: super::AddressWithTree) -> Self { + Self { + address: Ok(value.address), + tree: Ok(value.tree), + } + } + } + #[derive(Clone, Debug)] + pub struct ClosedAccountV2 { + account: ::std::result::Result, + nullifier: ::std::result::Result, + tx_hash: ::std::result::Result, + } + impl ::std::default::Default for ClosedAccountV2 { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + nullifier: Err("no value supplied for nullifier".to_string()), + tx_hash: Err("no value supplied for tx_hash".to_string()), + } + } + } + impl ClosedAccountV2 { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn nullifier(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.nullifier = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for nullifier: {e}") + }); + self + } + pub fn tx_hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tx_hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tx_hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::ClosedAccountV2 { + type Error = super::error::ConversionError; + fn try_from( + value: ClosedAccountV2, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + nullifier: value.nullifier?, + tx_hash: value.tx_hash?, + }) + } + } + impl ::std::convert::From for ClosedAccountV2 { + fn from(value: super::ClosedAccountV2) -> Self { + Self { + account: Ok(value.account), + nullifier: Ok(value.nullifier), + tx_hash: Ok(value.tx_hash), + } + } + } + #[derive(Clone, Debug)] + pub struct ClosedAccountWithOptionalTokenDataV2 { + account: ::std::result::Result< + super::ClosedAccountV2, + ::std::string::String, + >, + optional_token_data: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for ClosedAccountWithOptionalTokenDataV2 { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + optional_token_data: Ok(Default::default()), + } + } + } + impl ClosedAccountWithOptionalTokenDataV2 { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn optional_token_data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.optional_token_data = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for optional_token_data: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom + for super::ClosedAccountWithOptionalTokenDataV2 { + type Error = super::error::ConversionError; + fn try_from( + value: ClosedAccountWithOptionalTokenDataV2, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + optional_token_data: value.optional_token_data?, + }) + } + } + impl ::std::convert::From + for ClosedAccountWithOptionalTokenDataV2 { + fn from(value: super::ClosedAccountWithOptionalTokenDataV2) -> Self { + Self { + account: Ok(value.account), + optional_token_data: Ok(value.optional_token_data), + } + } + } + #[derive(Clone, Debug)] + pub struct ColdData { + data: ::std::result::Result, + discriminator: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for ColdData { + fn default() -> Self { + Self { + data: Err("no value supplied for data".to_string()), + discriminator: Err("no value supplied for discriminator".to_string()), + } + } + } + impl ColdData { + pub fn data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.data = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for data: {e}") + }); + self + } + pub fn discriminator(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.discriminator = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for discriminator: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::ColdData { + type Error = super::error::ConversionError; + fn try_from( + value: ColdData, + ) -> ::std::result::Result { + Ok(Self { + data: value.data?, + discriminator: value.discriminator?, + }) + } + } + impl ::std::convert::From for ColdData { + fn from(value: super::ColdData) -> Self { + Self { + data: Ok(value.data), + discriminator: Ok(value.discriminator), + } + } + } + #[derive(Clone, Debug)] + pub struct CompressedProof { + a: ::std::result::Result<::std::vec::Vec, ::std::string::String>, + b: ::std::result::Result<::std::vec::Vec, ::std::string::String>, + c: ::std::result::Result<::std::vec::Vec, ::std::string::String>, + } + impl ::std::default::Default for CompressedProof { + fn default() -> Self { + Self { + a: Err("no value supplied for a".to_string()), + b: Err("no value supplied for b".to_string()), + c: Err("no value supplied for c".to_string()), + } + } + } + impl CompressedProof { + pub fn a(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.a = value + .try_into() + .map_err(|e| format!("error converting supplied value for a: {e}")); + self + } + pub fn b(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.b = value + .try_into() + .map_err(|e| format!("error converting supplied value for b: {e}")); + self + } + pub fn c(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.c = value + .try_into() + .map_err(|e| format!("error converting supplied value for c: {e}")); + self + } + } + impl ::std::convert::TryFrom for super::CompressedProof { + type Error = super::error::ConversionError; + fn try_from( + value: CompressedProof, + ) -> ::std::result::Result { + Ok(Self { + a: value.a?, + b: value.b?, + c: value.c?, + }) + } + } + impl ::std::convert::From for CompressedProof { + fn from(value: super::CompressedProof) -> Self { + Self { + a: Ok(value.a), + b: Ok(value.b), + c: Ok(value.c), + } + } + } + #[derive(Clone, Debug)] + pub struct CompressedProofWithContext { + compressed_proof: ::std::result::Result< + super::CompressedProof, + ::std::string::String, + >, + leaf_indices: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + leaves: ::std::result::Result< + ::std::vec::Vec<::std::string::String>, + ::std::string::String, + >, + merkle_trees: ::std::result::Result< + ::std::vec::Vec<::std::string::String>, + ::std::string::String, + >, + root_indices: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + roots: ::std::result::Result< + ::std::vec::Vec<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for CompressedProofWithContext { + fn default() -> Self { + Self { + compressed_proof: Err( + "no value supplied for compressed_proof".to_string(), + ), + leaf_indices: Err("no value supplied for leaf_indices".to_string()), + leaves: Err("no value supplied for leaves".to_string()), + merkle_trees: Err("no value supplied for merkle_trees".to_string()), + root_indices: Err("no value supplied for root_indices".to_string()), + roots: Err("no value supplied for roots".to_string()), + } + } + } + impl CompressedProofWithContext { + pub fn compressed_proof(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.compressed_proof = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for compressed_proof: {e}" + ) + }); + self + } + pub fn leaf_indices(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.leaf_indices = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaf_indices: {e}") + }); + self + } + pub fn leaves(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.leaves = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaves: {e}") + }); + self + } + pub fn merkle_trees(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.merkle_trees = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for merkle_trees: {e}") + }); + self + } + pub fn root_indices(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.root_indices = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_indices: {e}") + }); + self + } + pub fn roots(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.roots = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for roots: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::CompressedProofWithContext { + type Error = super::error::ConversionError; + fn try_from( + value: CompressedProofWithContext, + ) -> ::std::result::Result { + Ok(Self { + compressed_proof: value.compressed_proof?, + leaf_indices: value.leaf_indices?, + leaves: value.leaves?, + merkle_trees: value.merkle_trees?, + root_indices: value.root_indices?, + roots: value.roots?, + }) + } + } + impl ::std::convert::From + for CompressedProofWithContext { + fn from(value: super::CompressedProofWithContext) -> Self { + Self { + compressed_proof: Ok(value.compressed_proof), + leaf_indices: Ok(value.leaf_indices), + leaves: Ok(value.leaves), + merkle_trees: Ok(value.merkle_trees), + root_indices: Ok(value.root_indices), + roots: Ok(value.roots), + } + } + } + #[derive(Clone, Debug)] + pub struct CompressedProofWithContextV2 { + accounts: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + addresses: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + compressed_proof: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for CompressedProofWithContextV2 { + fn default() -> Self { + Self { + accounts: Err("no value supplied for accounts".to_string()), + addresses: Err("no value supplied for addresses".to_string()), + compressed_proof: Ok(Default::default()), + } + } + } + impl CompressedProofWithContextV2 { + pub fn accounts(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.accounts = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for accounts: {e}") + }); + self + } + pub fn addresses(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.addresses = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for addresses: {e}") + }); + self + } + pub fn compressed_proof(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.compressed_proof = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for compressed_proof: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom + for super::CompressedProofWithContextV2 { + type Error = super::error::ConversionError; + fn try_from( + value: CompressedProofWithContextV2, + ) -> ::std::result::Result { + Ok(Self { + accounts: value.accounts?, + addresses: value.addresses?, + compressed_proof: value.compressed_proof?, + }) + } + } + impl ::std::convert::From + for CompressedProofWithContextV2 { + fn from(value: super::CompressedProofWithContextV2) -> Self { + Self { + accounts: Ok(value.accounts), + addresses: Ok(value.addresses), + compressed_proof: Ok(value.compressed_proof), + } + } + } + #[derive(Clone, Debug)] + pub struct CompressionInfoV2 { + closed_accounts: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + opened_accounts: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for CompressionInfoV2 { + fn default() -> Self { + Self { + closed_accounts: Err( + "no value supplied for closed_accounts".to_string(), + ), + opened_accounts: Err( + "no value supplied for opened_accounts".to_string(), + ), + } + } + } + impl CompressionInfoV2 { + pub fn closed_accounts(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.closed_accounts = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for closed_accounts: {e}" + ) + }); + self + } + pub fn opened_accounts(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.opened_accounts = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for opened_accounts: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom for super::CompressionInfoV2 { + type Error = super::error::ConversionError; + fn try_from( + value: CompressionInfoV2, + ) -> ::std::result::Result { + Ok(Self { + closed_accounts: value.closed_accounts?, + opened_accounts: value.opened_accounts?, + }) + } + } + impl ::std::convert::From for CompressionInfoV2 { + fn from(value: super::CompressionInfoV2) -> Self { + Self { + closed_accounts: Ok(value.closed_accounts), + opened_accounts: Ok(value.opened_accounts), + } + } + } + #[derive(Clone, Debug)] + pub struct Context { + slot: ::std::result::Result, + } + impl ::std::default::Default for Context { + fn default() -> Self { + Self { + slot: Err("no value supplied for slot".to_string()), + } + } + } + impl Context { + pub fn slot(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.slot = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for slot: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::Context { + type Error = super::error::ConversionError; + fn try_from( + value: Context, + ) -> ::std::result::Result { + Ok(Self { slot: value.slot? }) + } + } + impl ::std::convert::From for Context { + fn from(value: super::Context) -> Self { + Self { slot: Ok(value.slot) } + } + } + #[derive(Clone, Debug)] + pub struct DataSlice { + length: ::std::result::Result, + offset: ::std::result::Result, + } + impl ::std::default::Default for DataSlice { + fn default() -> Self { + Self { + length: Err("no value supplied for length".to_string()), + offset: Err("no value supplied for offset".to_string()), + } + } + } + impl DataSlice { + pub fn length(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.length = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for length: {e}") + }); + self + } + pub fn offset(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.offset = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for offset: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::DataSlice { + type Error = super::error::ConversionError; + fn try_from( + value: DataSlice, + ) -> ::std::result::Result { + Ok(Self { + length: value.length?, + offset: value.offset?, + }) + } + } + impl ::std::convert::From for DataSlice { + fn from(value: super::DataSlice) -> Self { + Self { + length: Ok(value.length), + offset: Ok(value.offset), + } + } + } + #[derive(Clone, Debug)] + pub struct FilterSelector { + memcmp: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for FilterSelector { + fn default() -> Self { + Self { + memcmp: Ok(Default::default()), + } + } + } + impl FilterSelector { + pub fn memcmp(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.memcmp = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for memcmp: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::FilterSelector { + type Error = super::error::ConversionError; + fn try_from( + value: FilterSelector, + ) -> ::std::result::Result { + Ok(Self { memcmp: value.memcmp? }) + } + } + impl ::std::convert::From for FilterSelector { + fn from(value: super::FilterSelector) -> Self { + Self { memcmp: Ok(value.memcmp) } + } + } + #[derive(Clone, Debug)] + pub struct GetCompressedAccountProofResponseValue { + hash: ::std::result::Result, + leaf_index: ::std::result::Result, + merkle_tree: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + proof: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + root: ::std::result::Result, + root_seq: ::std::result::Result, + } + impl ::std::default::Default for GetCompressedAccountProofResponseValue { + fn default() -> Self { + Self { + hash: Err("no value supplied for hash".to_string()), + leaf_index: Err("no value supplied for leaf_index".to_string()), + merkle_tree: Err("no value supplied for merkle_tree".to_string()), + proof: Err("no value supplied for proof".to_string()), + root: Err("no value supplied for root".to_string()), + root_seq: Err("no value supplied for root_seq".to_string()), + } + } + } + impl GetCompressedAccountProofResponseValue { + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + pub fn leaf_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.leaf_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaf_index: {e}") + }); + self + } + pub fn merkle_tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.merkle_tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for merkle_tree: {e}") + }); + self + } + pub fn proof(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.proof = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for proof: {e}") + }); + self + } + pub fn root(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root: {e}") + }); + self + } + pub fn root_seq(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root_seq = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_seq: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::GetCompressedAccountProofResponseValue { + type Error = super::error::ConversionError; + fn try_from( + value: GetCompressedAccountProofResponseValue, + ) -> ::std::result::Result { + Ok(Self { + hash: value.hash?, + leaf_index: value.leaf_index?, + merkle_tree: value.merkle_tree?, + proof: value.proof?, + root: value.root?, + root_seq: value.root_seq?, + }) + } + } + impl ::std::convert::From + for GetCompressedAccountProofResponseValue { + fn from(value: super::GetCompressedAccountProofResponseValue) -> Self { + Self { + hash: Ok(value.hash), + leaf_index: Ok(value.leaf_index), + merkle_tree: Ok(value.merkle_tree), + proof: Ok(value.proof), + root: Ok(value.root), + root_seq: Ok(value.root_seq), + } + } + } + #[derive(Clone, Debug)] + pub struct GetCompressedAccountProofResponseValueV2 { + hash: ::std::result::Result, + leaf_index: ::std::result::Result, + proof: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + prove_by_index: ::std::result::Result, + root: ::std::result::Result, + root_seq: ::std::result::Result, + tree_context: ::std::result::Result< + super::TreeContextInfo, + ::std::string::String, + >, + } + impl ::std::default::Default for GetCompressedAccountProofResponseValueV2 { + fn default() -> Self { + Self { + hash: Err("no value supplied for hash".to_string()), + leaf_index: Err("no value supplied for leaf_index".to_string()), + proof: Err("no value supplied for proof".to_string()), + prove_by_index: Err( + "no value supplied for prove_by_index".to_string(), + ), + root: Err("no value supplied for root".to_string()), + root_seq: Err("no value supplied for root_seq".to_string()), + tree_context: Err("no value supplied for tree_context".to_string()), + } + } + } + impl GetCompressedAccountProofResponseValueV2 { + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + pub fn leaf_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.leaf_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaf_index: {e}") + }); + self + } + pub fn proof(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.proof = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for proof: {e}") + }); + self + } + pub fn prove_by_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.prove_by_index = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for prove_by_index: {e}" + ) + }); + self + } + pub fn root(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root: {e}") + }); + self + } + pub fn root_seq(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root_seq = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_seq: {e}") + }); + self + } + pub fn tree_context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree_context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree_context: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::GetCompressedAccountProofResponseValueV2 { + type Error = super::error::ConversionError; + fn try_from( + value: GetCompressedAccountProofResponseValueV2, + ) -> ::std::result::Result { + Ok(Self { + hash: value.hash?, + leaf_index: value.leaf_index?, + proof: value.proof?, + prove_by_index: value.prove_by_index?, + root: value.root?, + root_seq: value.root_seq?, + tree_context: value.tree_context?, + }) + } + } + impl ::std::convert::From + for GetCompressedAccountProofResponseValueV2 { + fn from(value: super::GetCompressedAccountProofResponseValueV2) -> Self { + Self { + hash: Ok(value.hash), + leaf_index: Ok(value.leaf_index), + proof: Ok(value.proof), + prove_by_index: Ok(value.prove_by_index), + root: Ok(value.root), + root_seq: Ok(value.root_seq), + tree_context: Ok(value.tree_context), + } + } + } + #[derive(Clone, Debug)] + pub struct InputQueueData { + account_hashes: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + first_queue_index: ::std::result::Result, + leaf_indices: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + leaves: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + leaves_hash_chains: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + nullifiers: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + tx_hashes: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for InputQueueData { + fn default() -> Self { + Self { + account_hashes: Err( + "no value supplied for account_hashes".to_string(), + ), + first_queue_index: Err( + "no value supplied for first_queue_index".to_string(), + ), + leaf_indices: Err("no value supplied for leaf_indices".to_string()), + leaves: Err("no value supplied for leaves".to_string()), + leaves_hash_chains: Err( + "no value supplied for leaves_hash_chains".to_string(), + ), + nullifiers: Err("no value supplied for nullifiers".to_string()), + tx_hashes: Err("no value supplied for tx_hashes".to_string()), + } + } + } + impl InputQueueData { + pub fn account_hashes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.account_hashes = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for account_hashes: {e}" + ) + }); + self + } + pub fn first_queue_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.first_queue_index = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for first_queue_index: {e}" + ) + }); + self + } + pub fn leaf_indices(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.leaf_indices = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaf_indices: {e}") + }); + self + } + pub fn leaves(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.leaves = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaves: {e}") + }); + self + } + pub fn leaves_hash_chains(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.leaves_hash_chains = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for leaves_hash_chains: {e}" + ) + }); + self + } + pub fn nullifiers(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.nullifiers = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for nullifiers: {e}") + }); + self + } + pub fn tx_hashes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.tx_hashes = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tx_hashes: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::InputQueueData { + type Error = super::error::ConversionError; + fn try_from( + value: InputQueueData, + ) -> ::std::result::Result { + Ok(Self { + account_hashes: value.account_hashes?, + first_queue_index: value.first_queue_index?, + leaf_indices: value.leaf_indices?, + leaves: value.leaves?, + leaves_hash_chains: value.leaves_hash_chains?, + nullifiers: value.nullifiers?, + tx_hashes: value.tx_hashes?, + }) + } + } + impl ::std::convert::From for InputQueueData { + fn from(value: super::InputQueueData) -> Self { + Self { + account_hashes: Ok(value.account_hashes), + first_queue_index: Ok(value.first_queue_index), + leaf_indices: Ok(value.leaf_indices), + leaves: Ok(value.leaves), + leaves_hash_chains: Ok(value.leaves_hash_chains), + nullifiers: Ok(value.nullifiers), + tx_hashes: Ok(value.tx_hashes), + } + } + } + #[derive(Clone, Debug)] + pub struct Memcmp { + bytes: ::std::result::Result, + offset: ::std::result::Result, + } + impl ::std::default::Default for Memcmp { + fn default() -> Self { + Self { + bytes: Err("no value supplied for bytes".to_string()), + offset: Err("no value supplied for offset".to_string()), + } + } + } + impl Memcmp { + pub fn bytes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.bytes = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for bytes: {e}") + }); + self + } + pub fn offset(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.offset = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for offset: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::Memcmp { + type Error = super::error::ConversionError; + fn try_from( + value: Memcmp, + ) -> ::std::result::Result { + Ok(Self { + bytes: value.bytes?, + offset: value.offset?, + }) + } + } + impl ::std::convert::From for Memcmp { + fn from(value: super::Memcmp) -> Self { + Self { + bytes: Ok(value.bytes), + offset: Ok(value.offset), + } + } + } + #[derive(Clone, Debug)] + pub struct MerkleContextV2 { + cpi_context: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + next_tree_context: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + queue: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + tree: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + tree_type: ::std::result::Result, + } + impl ::std::default::Default for MerkleContextV2 { + fn default() -> Self { + Self { + cpi_context: Ok(Default::default()), + next_tree_context: Ok(Default::default()), + queue: Err("no value supplied for queue".to_string()), + tree: Err("no value supplied for tree".to_string()), + tree_type: Err("no value supplied for tree_type".to_string()), + } + } + } + impl MerkleContextV2 { + pub fn cpi_context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.cpi_context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cpi_context: {e}") + }); + self + } + pub fn next_tree_context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.next_tree_context = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for next_tree_context: {e}" + ) + }); + self + } + pub fn queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queue: {e}") + }); + self + } + pub fn tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree: {e}") + }); + self + } + pub fn tree_type(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree_type = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree_type: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::MerkleContextV2 { + type Error = super::error::ConversionError; + fn try_from( + value: MerkleContextV2, + ) -> ::std::result::Result { + Ok(Self { + cpi_context: value.cpi_context?, + next_tree_context: value.next_tree_context?, + queue: value.queue?, + tree: value.tree?, + tree_type: value.tree_type?, + }) + } + } + impl ::std::convert::From for MerkleContextV2 { + fn from(value: super::MerkleContextV2) -> Self { + Self { + cpi_context: Ok(value.cpi_context), + next_tree_context: Ok(value.next_tree_context), + queue: Ok(value.queue), + tree: Ok(value.tree), + tree_type: Ok(value.tree_type), + } + } + } + #[derive(Clone, Debug)] + pub struct MerkleContextWithNewAddressProof { + address: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + higher_range_address: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + low_element_leaf_index: ::std::result::Result, + lower_range_address: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + merkle_tree: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + next_index: ::std::result::Result, + proof: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + root: ::std::result::Result, + root_seq: ::std::result::Result, + } + impl ::std::default::Default for MerkleContextWithNewAddressProof { + fn default() -> Self { + Self { + address: Err("no value supplied for address".to_string()), + higher_range_address: Err( + "no value supplied for higher_range_address".to_string(), + ), + low_element_leaf_index: Err( + "no value supplied for low_element_leaf_index".to_string(), + ), + lower_range_address: Err( + "no value supplied for lower_range_address".to_string(), + ), + merkle_tree: Err("no value supplied for merkle_tree".to_string()), + next_index: Err("no value supplied for next_index".to_string()), + proof: Err("no value supplied for proof".to_string()), + root: Err("no value supplied for root".to_string()), + root_seq: Err("no value supplied for root_seq".to_string()), + } + } + } + impl MerkleContextWithNewAddressProof { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn higher_range_address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.higher_range_address = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for higher_range_address: {e}" + ) + }); + self + } + pub fn low_element_leaf_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.low_element_leaf_index = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for low_element_leaf_index: {e}" + ) + }); + self + } + pub fn lower_range_address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.lower_range_address = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for lower_range_address: {e}" + ) + }); + self + } + pub fn merkle_tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.merkle_tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for merkle_tree: {e}") + }); + self + } + pub fn next_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.next_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for next_index: {e}") + }); + self + } + pub fn proof(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.proof = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for proof: {e}") + }); + self + } + pub fn root(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root: {e}") + }); + self + } + pub fn root_seq(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root_seq = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_seq: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::MerkleContextWithNewAddressProof { + type Error = super::error::ConversionError; + fn try_from( + value: MerkleContextWithNewAddressProof, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + higher_range_address: value.higher_range_address?, + low_element_leaf_index: value.low_element_leaf_index?, + lower_range_address: value.lower_range_address?, + merkle_tree: value.merkle_tree?, + next_index: value.next_index?, + proof: value.proof?, + root: value.root?, + root_seq: value.root_seq?, + }) + } + } + impl ::std::convert::From + for MerkleContextWithNewAddressProof { + fn from(value: super::MerkleContextWithNewAddressProof) -> Self { + Self { + address: Ok(value.address), + higher_range_address: Ok(value.higher_range_address), + low_element_leaf_index: Ok(value.low_element_leaf_index), + lower_range_address: Ok(value.lower_range_address), + merkle_tree: Ok(value.merkle_tree), + next_index: Ok(value.next_index), + proof: Ok(value.proof), + root: Ok(value.root), + root_seq: Ok(value.root_seq), + } + } + } + #[derive(Clone, Debug)] + pub struct Node { + hash: ::std::result::Result, + index: ::std::result::Result, + } + impl ::std::default::Default for Node { + fn default() -> Self { + Self { + hash: Err("no value supplied for hash".to_string()), + index: Err("no value supplied for index".to_string()), + } + } + } + impl Node { + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + pub fn index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for index: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::Node { + type Error = super::error::ConversionError; + fn try_from( + value: Node, + ) -> ::std::result::Result { + Ok(Self { + hash: value.hash?, + index: value.index?, + }) + } + } + impl ::std::convert::From for Node { + fn from(value: super::Node) -> Self { + Self { + hash: Ok(value.hash), + index: Ok(value.index), + } + } + } + #[derive(Clone, Debug)] + pub struct OutputQueueData { + account_hashes: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + first_queue_index: ::std::result::Result, + leaf_indices: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + leaves: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + leaves_hash_chains: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + next_index: ::std::result::Result, + } + impl ::std::default::Default for OutputQueueData { + fn default() -> Self { + Self { + account_hashes: Err( + "no value supplied for account_hashes".to_string(), + ), + first_queue_index: Err( + "no value supplied for first_queue_index".to_string(), + ), + leaf_indices: Err("no value supplied for leaf_indices".to_string()), + leaves: Err("no value supplied for leaves".to_string()), + leaves_hash_chains: Err( + "no value supplied for leaves_hash_chains".to_string(), + ), + next_index: Err("no value supplied for next_index".to_string()), + } + } + } + impl OutputQueueData { + pub fn account_hashes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.account_hashes = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for account_hashes: {e}" + ) + }); + self + } + pub fn first_queue_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.first_queue_index = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for first_queue_index: {e}" + ) + }); + self + } + pub fn leaf_indices(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.leaf_indices = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaf_indices: {e}") + }); + self + } + pub fn leaves(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.leaves = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for leaves: {e}") + }); + self + } + pub fn leaves_hash_chains(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.leaves_hash_chains = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for leaves_hash_chains: {e}" + ) + }); + self + } + pub fn next_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.next_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for next_index: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::OutputQueueData { + type Error = super::error::ConversionError; + fn try_from( + value: OutputQueueData, + ) -> ::std::result::Result { + Ok(Self { + account_hashes: value.account_hashes?, + first_queue_index: value.first_queue_index?, + leaf_indices: value.leaf_indices?, + leaves: value.leaves?, + leaves_hash_chains: value.leaves_hash_chains?, + next_index: value.next_index?, + }) + } + } + impl ::std::convert::From for OutputQueueData { + fn from(value: super::OutputQueueData) -> Self { + Self { + account_hashes: Ok(value.account_hashes), + first_queue_index: Ok(value.first_queue_index), + leaf_indices: Ok(value.leaf_indices), + leaves: Ok(value.leaves), + leaves_hash_chains: Ok(value.leaves_hash_chains), + next_index: Ok(value.next_index), + } + } + } + #[derive(Clone, Debug)] + pub struct OwnerBalance { + balance: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for OwnerBalance { + fn default() -> Self { + Self { + balance: Err("no value supplied for balance".to_string()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl OwnerBalance { + pub fn balance(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.balance = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for balance: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::OwnerBalance { + type Error = super::error::ConversionError; + fn try_from( + value: OwnerBalance, + ) -> ::std::result::Result { + Ok(Self { + balance: value.balance?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From for OwnerBalance { + fn from(value: super::OwnerBalance) -> Self { + Self { + balance: Ok(value.balance), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct OwnerBalanceList { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for OwnerBalanceList { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + items: Err("no value supplied for items".to_string()), + } + } + } + impl OwnerBalanceList { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::OwnerBalanceList { + type Error = super::error::ConversionError; + fn try_from( + value: OwnerBalanceList, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + items: value.items?, + }) + } + } + impl ::std::convert::From for OwnerBalanceList { + fn from(value: super::OwnerBalanceList) -> Self { + Self { + cursor: Ok(value.cursor), + items: Ok(value.items), + } + } + } + #[derive(Clone, Debug)] + pub struct OwnerBalancesResponse { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default for OwnerBalancesResponse { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl OwnerBalancesResponse { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::OwnerBalancesResponse { + type Error = super::error::ConversionError; + fn try_from( + value: OwnerBalancesResponse, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for OwnerBalancesResponse { + fn from(value: super::OwnerBalancesResponse) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PaginatedAccountList { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PaginatedAccountList { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + items: Err("no value supplied for items".to_string()), + } + } + } + impl PaginatedAccountList { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PaginatedAccountList { + type Error = super::error::ConversionError; + fn try_from( + value: PaginatedAccountList, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + items: value.items?, + }) + } + } + impl ::std::convert::From for PaginatedAccountList { + fn from(value: super::PaginatedAccountList) -> Self { + Self { + cursor: Ok(value.cursor), + items: Ok(value.items), + } + } + } + #[derive(Clone, Debug)] + pub struct PaginatedAccountListV2 { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PaginatedAccountListV2 { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + items: Err("no value supplied for items".to_string()), + } + } + } + impl PaginatedAccountListV2 { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PaginatedAccountListV2 { + type Error = super::error::ConversionError; + fn try_from( + value: PaginatedAccountListV2, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + items: value.items?, + }) + } + } + impl ::std::convert::From + for PaginatedAccountListV2 { + fn from(value: super::PaginatedAccountListV2) -> Self { + Self { + cursor: Ok(value.cursor), + items: Ok(value.items), + } + } + } + #[derive(Clone, Debug)] + pub struct PaginatedSignatureInfoList { + cursor: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PaginatedSignatureInfoList { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + items: Err("no value supplied for items".to_string()), + } + } + } + impl PaginatedSignatureInfoList { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PaginatedSignatureInfoList { + type Error = super::error::ConversionError; + fn try_from( + value: PaginatedSignatureInfoList, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + items: value.items?, + }) + } + } + impl ::std::convert::From + for PaginatedSignatureInfoList { + fn from(value: super::PaginatedSignatureInfoList) -> Self { + Self { + cursor: Ok(value.cursor), + items: Ok(value.items), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfaceBody { + id: ::std::result::Result< + super::PostGetAccountInterfaceBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetAccountInterfaceBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetAccountInterfaceBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetAccountInterfaceBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfaceBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetAccountInterfaceBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfaceBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfaceBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfaceBody { + fn from(value: super::PostGetAccountInterfaceBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfaceBodyParams { + address: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfaceBodyParams { + fn default() -> Self { + Self { + address: Err("no value supplied for address".to_string()), + } + } + } + impl PostGetAccountInterfaceBodyParams { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfaceBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfaceBodyParams, + ) -> ::std::result::Result { + Ok(Self { address: value.address? }) + } + } + impl ::std::convert::From + for PostGetAccountInterfaceBodyParams { + fn from(value: super::PostGetAccountInterfaceBodyParams) -> Self { + Self { address: Ok(value.address) } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfaceResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetAccountInterfaceResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetAccountInterfaceResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfaceResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetAccountInterfaceResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetAccountInterfaceResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfaceResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfaceResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfaceResponse { + fn from(value: super::PostGetAccountInterfaceResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfaceResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfaceResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetAccountInterfaceResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfaceResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfaceResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfaceResponseError { + fn from(value: super::PostGetAccountInterfaceResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfaceResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfaceResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Ok(Default::default()), + } + } + } + impl PostGetAccountInterfaceResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfaceResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfaceResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfaceResponseResult { + fn from(value: super::PostGetAccountInterfaceResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfacesBody { + id: ::std::result::Result< + super::PostGetAccountInterfacesBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetAccountInterfacesBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetAccountInterfacesBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetAccountInterfacesBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfacesBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetAccountInterfacesBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfacesBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfacesBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfacesBody { + fn from(value: super::PostGetAccountInterfacesBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfacesBodyParams { + addresses: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfacesBodyParams { + fn default() -> Self { + Self { + addresses: Err("no value supplied for addresses".to_string()), + } + } + } + impl PostGetAccountInterfacesBodyParams { + pub fn addresses(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.addresses = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for addresses: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfacesBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfacesBodyParams, + ) -> ::std::result::Result { + Ok(Self { + addresses: value.addresses?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfacesBodyParams { + fn from(value: super::PostGetAccountInterfacesBodyParams) -> Self { + Self { + addresses: Ok(value.addresses), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfacesResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetAccountInterfacesResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetAccountInterfacesResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfacesResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetAccountInterfacesResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetAccountInterfacesResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfacesResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfacesResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfacesResponse { + fn from(value: super::PostGetAccountInterfacesResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfacesResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfacesResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetAccountInterfacesResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfacesResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfacesResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfacesResponseError { + fn from(value: super::PostGetAccountInterfacesResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAccountInterfacesResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::vec::Vec<::std::option::Option>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAccountInterfacesResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetAccountInterfacesResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec<::std::option::Option>, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAccountInterfacesResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAccountInterfacesResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetAccountInterfacesResponseResult { + fn from(value: super::PostGetAccountInterfacesResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAtaInterfaceBody { + id: ::std::result::Result< + super::PostGetAtaInterfaceBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetAtaInterfaceBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetAtaInterfaceBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetAtaInterfaceBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAtaInterfaceBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetAtaInterfaceBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAtaInterfaceBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAtaInterfaceBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetAtaInterfaceBody { + fn from(value: super::PostGetAtaInterfaceBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAtaInterfaceBodyParams { + mint: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAtaInterfaceBodyParams { + fn default() -> Self { + Self { + mint: Err("no value supplied for mint".to_string()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetAtaInterfaceBodyParams { + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAtaInterfaceBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAtaInterfaceBodyParams, + ) -> ::std::result::Result { + Ok(Self { + mint: value.mint?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From + for PostGetAtaInterfaceBodyParams { + fn from(value: super::PostGetAtaInterfaceBodyParams) -> Self { + Self { + mint: Ok(value.mint), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAtaInterfaceResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetAtaInterfaceResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetAtaInterfaceResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAtaInterfaceResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetAtaInterfaceResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAtaInterfaceResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAtaInterfaceResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetAtaInterfaceResponse { + fn from(value: super::PostGetAtaInterfaceResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAtaInterfaceResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAtaInterfaceResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetAtaInterfaceResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAtaInterfaceResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAtaInterfaceResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetAtaInterfaceResponseError { + fn from(value: super::PostGetAtaInterfaceResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetAtaInterfaceResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetAtaInterfaceResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Ok(Default::default()), + } + } + } + impl PostGetAtaInterfaceResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetAtaInterfaceResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetAtaInterfaceResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetAtaInterfaceResponseResult { + fn from(value: super::PostGetAtaInterfaceResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountBalanceBody { + id: ::std::result::Result< + super::PostGetCompressedAccountBalanceBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountBalanceBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedAccountBalanceBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedAccountBalanceBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountBalanceBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedAccountBalanceBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountBalanceBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountBalanceBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountBalanceBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountBalanceBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountBalanceBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountBalanceBody { + fn from(value: super::PostGetCompressedAccountBalanceBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountBalanceBodyParams { + address: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + hash: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountBalanceBodyParams { + fn default() -> Self { + Self { + address: Ok(Default::default()), + hash: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountBalanceBodyParams { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountBalanceBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountBalanceBodyParams, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + hash: value.hash?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountBalanceBodyParams { + fn from(value: super::PostGetCompressedAccountBalanceBodyParams) -> Self { + Self { + address: Ok(value.address), + hash: Ok(value.hash), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountBalanceResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountBalanceResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedAccountBalanceResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountBalanceResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountBalanceResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountBalanceResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountBalanceResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountBalanceResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountBalanceResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountBalanceResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountBalanceResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountBalanceResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountBalanceResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountBalanceResponse { + fn from(value: super::PostGetCompressedAccountBalanceResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountBalanceResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountBalanceResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountBalanceResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountBalanceResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountBalanceResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountBalanceResponseError { + fn from(value: super::PostGetCompressedAccountBalanceResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountBalanceResponseResult { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default for PostGetCompressedAccountBalanceResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedAccountBalanceResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountBalanceResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountBalanceResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountBalanceResponseResult { + fn from( + value: super::PostGetCompressedAccountBalanceResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountBody { + id: ::std::result::Result< + super::PostGetCompressedAccountBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedAccountBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedAccountBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedAccountBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountBody { + fn from(value: super::PostGetCompressedAccountBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountBodyParams { + address: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + hash: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountBodyParams { + fn default() -> Self { + Self { + address: Ok(Default::default()), + hash: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountBodyParams { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountBodyParams, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + hash: value.hash?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountBodyParams { + fn from(value: super::PostGetCompressedAccountBodyParams) -> Self { + Self { + address: Ok(value.address), + hash: Ok(value.hash), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofBody { + id: ::std::result::Result< + super::PostGetCompressedAccountProofBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountProofBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedAccountProofBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedAccountProofBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountProofBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedAccountProofBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofBody { + fn from(value: super::PostGetCompressedAccountProofBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofBodyParams { + hash: ::std::result::Result, + } + impl ::std::default::Default for PostGetCompressedAccountProofBodyParams { + fn default() -> Self { + Self { + hash: Err("no value supplied for hash".to_string()), + } + } + } + impl PostGetCompressedAccountProofBodyParams { + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofBodyParams, + ) -> ::std::result::Result { + Ok(Self { hash: value.hash? }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofBodyParams { + fn from(value: super::PostGetCompressedAccountProofBodyParams) -> Self { + Self { hash: Ok(value.hash) } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedAccountProofResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountProofResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountProofResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountProofResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountProofResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountProofResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountProofResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofResponse { + fn from(value: super::PostGetCompressedAccountProofResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountProofResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountProofResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofResponseError { + fn from(value: super::PostGetCompressedAccountProofResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::GetCompressedAccountProofResponseValue, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountProofResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedAccountProofResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::GetCompressedAccountProofResponseValue, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofResponseResult { + fn from(value: super::PostGetCompressedAccountProofResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofV2Body { + id: ::std::result::Result< + super::PostGetCompressedAccountProofV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountProofV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedAccountProofV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedAccountProofV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountProofV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedAccountProofV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofV2BodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofV2Body { + fn from(value: super::PostGetCompressedAccountProofV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofV2BodyParams { + hash: ::std::result::Result, + } + impl ::std::default::Default for PostGetCompressedAccountProofV2BodyParams { + fn default() -> Self { + Self { + hash: Err("no value supplied for hash".to_string()), + } + } + } + impl PostGetCompressedAccountProofV2BodyParams { + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { hash: value.hash? }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofV2BodyParams { + fn from(value: super::PostGetCompressedAccountProofV2BodyParams) -> Self { + Self { hash: Ok(value.hash) } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountProofV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedAccountProofV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountProofV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountProofV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountProofV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountProofV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountProofV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountProofV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountProofV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofV2Response { + fn from(value: super::PostGetCompressedAccountProofV2Response) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountProofV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountProofV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofV2ResponseError { + fn from(value: super::PostGetCompressedAccountProofV2ResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountProofV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::GetCompressedAccountProofResponseValueV2, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountProofV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedAccountProofV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::GetCompressedAccountProofResponseValueV2, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountProofV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountProofV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountProofV2ResponseResult { + fn from( + value: super::PostGetCompressedAccountProofV2ResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedAccountResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountResponse { + fn from(value: super::PostGetCompressedAccountResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountResponseError { + fn from(value: super::PostGetCompressedAccountResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountResponseResult { + fn from(value: super::PostGetCompressedAccountResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountV2Body { + id: ::std::result::Result< + super::PostGetCompressedAccountV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedAccountV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedAccountV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedAccountV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountV2Body { + fn from(value: super::PostGetCompressedAccountV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountV2BodyParams { + address: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + hash: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountV2BodyParams { + fn default() -> Self { + Self { + address: Ok(Default::default()), + hash: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountV2BodyParams { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + hash: value.hash?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountV2BodyParams { + fn from(value: super::PostGetCompressedAccountV2BodyParams) -> Self { + Self { + address: Ok(value.address), + hash: Ok(value.hash), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountV2Response { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedAccountV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountV2Response { + fn from(value: super::PostGetCompressedAccountV2Response) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountV2ResponseError { + fn from(value: super::PostGetCompressedAccountV2ResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountV2ResponseResult { + fn from(value: super::PostGetCompressedAccountV2ResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerBody { + id: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedAccountsByOwnerBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerBody { + fn from(value: super::PostGetCompressedAccountsByOwnerBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerBodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + data_slice: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + filters: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + data_slice: Ok(Default::default()), + filters: Ok(Default::default()), + limit: Ok(Default::default()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressedAccountsByOwnerBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn data_slice(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.data_slice = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for data_slice: {e}") + }); + self + } + pub fn filters(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.filters = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for filters: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + data_slice: value.data_slice?, + filters: value.filters?, + limit: value.limit?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerBodyParams { + fn from(value: super::PostGetCompressedAccountsByOwnerBodyParams) -> Self { + Self { + cursor: Ok(value.cursor), + data_slice: Ok(value.data_slice), + filters: Ok(value.filters), + limit: Ok(value.limit), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountsByOwnerResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountsByOwnerResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountsByOwnerResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountsByOwnerResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountsByOwnerResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerResponse { + fn from(value: super::PostGetCompressedAccountsByOwnerResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountsByOwnerResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerResponseError { + fn from( + value: super::PostGetCompressedAccountsByOwnerResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::PaginatedAccountList, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedAccountsByOwnerResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerResponseResult { + fn from( + value: super::PostGetCompressedAccountsByOwnerResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerV2Body { + id: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedAccountsByOwnerV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerV2BodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerV2BodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerV2Body { + fn from(value: super::PostGetCompressedAccountsByOwnerV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerV2BodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + data_slice: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + filters: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerV2BodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + data_slice: Ok(Default::default()), + filters: Ok(Default::default()), + limit: Ok(Default::default()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressedAccountsByOwnerV2BodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn data_slice(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.data_slice = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for data_slice: {e}") + }); + self + } + pub fn filters(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.filters = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for filters: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + data_slice: value.data_slice?, + filters: value.filters?, + limit: value.limit?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerV2BodyParams { + fn from(value: super::PostGetCompressedAccountsByOwnerV2BodyParams) -> Self { + Self { + cursor: Ok(value.cursor), + data_slice: Ok(value.data_slice), + filters: Ok(value.filters), + limit: Ok(value.limit), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountsByOwnerV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedAccountsByOwnerV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedAccountsByOwnerV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedAccountsByOwnerV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountsByOwnerV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountsByOwnerV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedAccountsByOwnerV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedAccountsByOwnerV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerV2Response { + fn from(value: super::PostGetCompressedAccountsByOwnerV2Response) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedAccountsByOwnerV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedAccountsByOwnerV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedAccountsByOwnerV2ResponseError { + fn from( + value: super::PostGetCompressedAccountsByOwnerV2ResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedAccountsByOwnerV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::PaginatedAccountListV2, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedAccountsByOwnerV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedAccountsByOwnerV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedAccountsByOwnerV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedAccountsByOwnerV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedAccountsByOwnerV2ResponseResult, + > for PostGetCompressedAccountsByOwnerV2ResponseResult { + fn from( + value: super::PostGetCompressedAccountsByOwnerV2ResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerBody { + id: ::std::result::Result< + super::PostGetCompressedBalanceByOwnerBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedBalanceByOwnerBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedBalanceByOwnerBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedBalanceByOwnerBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedBalanceByOwnerBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedBalanceByOwnerBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedBalanceByOwnerBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedBalanceByOwnerBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedBalanceByOwnerBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedBalanceByOwnerBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedBalanceByOwnerBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedBalanceByOwnerBody { + fn from(value: super::PostGetCompressedBalanceByOwnerBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerBodyParams { + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedBalanceByOwnerBodyParams { + fn default() -> Self { + Self { + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressedBalanceByOwnerBodyParams { + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedBalanceByOwnerBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedBalanceByOwnerBodyParams, + ) -> ::std::result::Result { + Ok(Self { owner: value.owner? }) + } + } + impl ::std::convert::From + for PostGetCompressedBalanceByOwnerBodyParams { + fn from(value: super::PostGetCompressedBalanceByOwnerBodyParams) -> Self { + Self { owner: Ok(value.owner) } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedBalanceByOwnerResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedBalanceByOwnerResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedBalanceByOwnerResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedBalanceByOwnerResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedBalanceByOwnerResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedBalanceByOwnerResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedBalanceByOwnerResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedBalanceByOwnerResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedBalanceByOwnerResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedBalanceByOwnerResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedBalanceByOwnerResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedBalanceByOwnerResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedBalanceByOwnerResponse { + fn from(value: super::PostGetCompressedBalanceByOwnerResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedBalanceByOwnerResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedBalanceByOwnerResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedBalanceByOwnerResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedBalanceByOwnerResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedBalanceByOwnerResponseError { + fn from(value: super::PostGetCompressedBalanceByOwnerResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedBalanceByOwnerResponseResult { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default for PostGetCompressedBalanceByOwnerResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedBalanceByOwnerResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedBalanceByOwnerResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedBalanceByOwnerResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedBalanceByOwnerResponseResult { + fn from( + value: super::PostGetCompressedBalanceByOwnerResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedMintTokenHoldersBody { + id: ::std::result::Result< + super::PostGetCompressedMintTokenHoldersBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedMintTokenHoldersBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedMintTokenHoldersBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedMintTokenHoldersBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedMintTokenHoldersBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedMintTokenHoldersBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedMintTokenHoldersBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedMintTokenHoldersBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedMintTokenHoldersBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedMintTokenHoldersBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedMintTokenHoldersBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedMintTokenHoldersBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedMintTokenHoldersBody { + fn from(value: super::PostGetCompressedMintTokenHoldersBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedMintTokenHoldersBodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + mint: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedMintTokenHoldersBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + mint: Err("no value supplied for mint".to_string()), + } + } + } + impl PostGetCompressedMintTokenHoldersBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedMintTokenHoldersBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedMintTokenHoldersBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + mint: value.mint?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedMintTokenHoldersBodyParams { + fn from(value: super::PostGetCompressedMintTokenHoldersBodyParams) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + mint: Ok(value.mint), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedMintTokenHoldersResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedMintTokenHoldersResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedMintTokenHoldersResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedMintTokenHoldersResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedMintTokenHoldersResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedMintTokenHoldersResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedMintTokenHoldersResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedMintTokenHoldersResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedMintTokenHoldersResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedMintTokenHoldersResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedMintTokenHoldersResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedMintTokenHoldersResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedMintTokenHoldersResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedMintTokenHoldersResponse { + fn from(value: super::PostGetCompressedMintTokenHoldersResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedMintTokenHoldersResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedMintTokenHoldersResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedMintTokenHoldersResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedMintTokenHoldersResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedMintTokenHoldersResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedMintTokenHoldersResponseError { + fn from( + value: super::PostGetCompressedMintTokenHoldersResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedMintTokenHoldersResponseResult { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default + for PostGetCompressedMintTokenHoldersResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedMintTokenHoldersResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedMintTokenHoldersResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedMintTokenHoldersResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedMintTokenHoldersResponseResult { + fn from( + value: super::PostGetCompressedMintTokenHoldersResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountBalanceBody { + id: ::std::result::Result< + super::PostGetCompressedTokenAccountBalanceBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountBalanceBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedTokenAccountBalanceBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedTokenAccountBalanceBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenAccountBalanceBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedTokenAccountBalanceBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountBalanceBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountBalanceBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountBalanceBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountBalanceBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountBalanceBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountBalanceBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountBalanceBody { + fn from(value: super::PostGetCompressedTokenAccountBalanceBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountBalanceBodyParams { + address: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + hash: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenAccountBalanceBodyParams { + fn default() -> Self { + Self { + address: Ok(Default::default()), + hash: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountBalanceBodyParams { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountBalanceBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountBalanceBodyParams, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + hash: value.hash?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountBalanceBodyParams { + fn from( + value: super::PostGetCompressedTokenAccountBalanceBodyParams, + ) -> Self { + Self { + address: Ok(value.address), + hash: Ok(value.hash), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountBalanceResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountBalanceResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedTokenAccountBalanceResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountBalanceResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountBalanceResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenAccountBalanceResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountBalanceResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountBalanceResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountBalanceResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountBalanceResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountBalanceResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountBalanceResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountBalanceResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountBalanceResponse { + fn from(value: super::PostGetCompressedTokenAccountBalanceResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountBalanceResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountBalanceResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountBalanceResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountBalanceResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountBalanceResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountBalanceResponseError, + > for PostGetCompressedTokenAccountBalanceResponseError { + fn from( + value: super::PostGetCompressedTokenAccountBalanceResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountBalanceResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::TokenAccountBalance, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountBalanceResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedTokenAccountBalanceResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountBalanceResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountBalanceResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountBalanceResponseResult, + > for PostGetCompressedTokenAccountBalanceResponseResult { + fn from( + value: super::PostGetCompressedTokenAccountBalanceResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateBody { + id: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenAccountsByDelegateBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByDelegateBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountsByDelegateBody { + fn from(value: super::PostGetCompressedTokenAccountsByDelegateBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateBodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + delegate: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + mint: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + delegate: Err("no value supplied for delegate".to_string()), + limit: Ok(Default::default()), + mint: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn delegate(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.delegate = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for delegate: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByDelegateBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + delegate: value.delegate?, + limit: value.limit?, + mint: value.mint?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByDelegateBodyParams, + > for PostGetCompressedTokenAccountsByDelegateBodyParams { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateBodyParams, + ) -> Self { + Self { + cursor: Ok(value.cursor), + delegate: Ok(value.delegate), + limit: Ok(value.limit), + mint: Ok(value.mint), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByDelegateResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByDelegateResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByDelegateResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByDelegateResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByDelegateResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByDelegateResponse, + > for PostGetCompressedTokenAccountsByDelegateResponse { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateResponse, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenAccountsByDelegateResponseError, + > for super::PostGetCompressedTokenAccountsByDelegateResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByDelegateResponseError, + > for PostGetCompressedTokenAccountsByDelegateResponseError { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateResponseResult { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenAccountsByDelegateResponseResult, + > for super::PostGetCompressedTokenAccountsByDelegateResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByDelegateResponseResult, + > for PostGetCompressedTokenAccountsByDelegateResponseResult { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateV2Body { + id: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenAccountsByDelegateV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateV2BodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateV2BodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByDelegateV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountsByDelegateV2Body { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateV2Body, + ) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateV2BodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + delegate: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + mint: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateV2BodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + delegate: Err("no value supplied for delegate".to_string()), + limit: Ok(Default::default()), + mint: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateV2BodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn delegate(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.delegate = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for delegate: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenAccountsByDelegateV2BodyParams, + > for super::PostGetCompressedTokenAccountsByDelegateV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + delegate: value.delegate?, + limit: value.limit?, + mint: value.mint?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByDelegateV2BodyParams, + > for PostGetCompressedTokenAccountsByDelegateV2BodyParams { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateV2BodyParams, + ) -> Self { + Self { + cursor: Ok(value.cursor), + delegate: Ok(value.delegate), + limit: Ok(value.limit), + mint: Ok(value.mint), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByDelegateV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByDelegateV2Response, + > for PostGetCompressedTokenAccountsByDelegateV2Response { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateV2Response, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenAccountsByDelegateV2ResponseError, + > for super::PostGetCompressedTokenAccountsByDelegateV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseError, + > for PostGetCompressedTokenAccountsByDelegateV2ResponseError { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateV2ResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByDelegateV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::TokenAccountListV2, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByDelegateV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByDelegateV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenAccountsByDelegateV2ResponseResult, + > for super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByDelegateV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult, + > for PostGetCompressedTokenAccountsByDelegateV2ResponseResult { + fn from( + value: super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerBody { + id: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenAccountsByOwnerBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByOwnerBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountsByOwnerBody { + fn from(value: super::PostGetCompressedTokenAccountsByOwnerBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerBodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + mint: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByOwnerBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + mint: Ok(Default::default()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByOwnerBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + mint: value.mint?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountsByOwnerBodyParams { + fn from( + value: super::PostGetCompressedTokenAccountsByOwnerBodyParams, + ) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + mint: Ok(value.mint), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByOwnerResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByOwnerResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenAccountsByOwnerResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByOwnerResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByOwnerResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByOwnerResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountsByOwnerResponse { + fn from( + value: super::PostGetCompressedTokenAccountsByOwnerResponse, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByOwnerResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByOwnerResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByOwnerResponseError, + > for PostGetCompressedTokenAccountsByOwnerResponseError { + fn from( + value: super::PostGetCompressedTokenAccountsByOwnerResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerResponseResult { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByOwnerResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByOwnerResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByOwnerResponseResult, + > for PostGetCompressedTokenAccountsByOwnerResponseResult { + fn from( + value: super::PostGetCompressedTokenAccountsByOwnerResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerV2Body { + id: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenAccountsByOwnerV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerV2BodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerV2BodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByOwnerV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountsByOwnerV2Body { + fn from(value: super::PostGetCompressedTokenAccountsByOwnerV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerV2BodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + mint: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByOwnerV2BodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + mint: Ok(Default::default()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerV2BodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByOwnerV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + mint: value.mint?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByOwnerV2BodyParams, + > for PostGetCompressedTokenAccountsByOwnerV2BodyParams { + fn from( + value: super::PostGetCompressedTokenAccountsByOwnerV2BodyParams, + ) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + mint: Ok(value.mint), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByOwnerV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenAccountsByOwnerV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenAccountsByOwnerV2Response { + fn from( + value: super::PostGetCompressedTokenAccountsByOwnerV2Response, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByOwnerV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenAccountsByOwnerV2ResponseError, + > for super::PostGetCompressedTokenAccountsByOwnerV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseError, + > for PostGetCompressedTokenAccountsByOwnerV2ResponseError { + fn from( + value: super::PostGetCompressedTokenAccountsByOwnerV2ResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenAccountsByOwnerV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::TokenAccountListV2, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenAccountsByOwnerV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedTokenAccountsByOwnerV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenAccountsByOwnerV2ResponseResult, + > for super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenAccountsByOwnerV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult, + > for PostGetCompressedTokenAccountsByOwnerV2ResponseResult { + fn from( + value: super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerBody { + id: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenBalancesByOwnerBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenBalancesByOwnerBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenBalancesByOwnerBody { + fn from(value: super::PostGetCompressedTokenBalancesByOwnerBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerBodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + mint: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenBalancesByOwnerBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + mint: Ok(Default::default()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenBalancesByOwnerBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + mint: value.mint?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenBalancesByOwnerBodyParams { + fn from( + value: super::PostGetCompressedTokenBalancesByOwnerBodyParams, + ) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + mint: Ok(value.mint), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenBalancesByOwnerResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenBalancesByOwnerResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenBalancesByOwnerResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenBalancesByOwnerResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenBalancesByOwnerResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenBalancesByOwnerResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenBalancesByOwnerResponse { + fn from( + value: super::PostGetCompressedTokenBalancesByOwnerResponse, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenBalancesByOwnerResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenBalancesByOwnerResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenBalancesByOwnerResponseError, + > for PostGetCompressedTokenBalancesByOwnerResponseError { + fn from( + value: super::PostGetCompressedTokenBalancesByOwnerResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerResponseResult { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default + for PostGetCompressedTokenBalancesByOwnerResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenBalancesByOwnerResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenBalancesByOwnerResponseResult, + > for PostGetCompressedTokenBalancesByOwnerResponseResult { + fn from( + value: super::PostGetCompressedTokenBalancesByOwnerResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerV2Body { + id: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressedTokenBalancesByOwnerV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerV2BodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerV2BodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenBalancesByOwnerV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenBalancesByOwnerV2Body { + fn from(value: super::PostGetCompressedTokenBalancesByOwnerV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerV2BodyParams { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + mint: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenBalancesByOwnerV2BodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + mint: Ok(Default::default()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerV2BodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenBalancesByOwnerV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + mint: value.mint?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenBalancesByOwnerV2BodyParams, + > for PostGetCompressedTokenBalancesByOwnerV2BodyParams { + fn from( + value: super::PostGetCompressedTokenBalancesByOwnerV2BodyParams, + ) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + mint: Ok(value.mint), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenBalancesByOwnerV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressedTokenBalancesByOwnerV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressedTokenBalancesByOwnerV2Response { + fn from( + value: super::PostGetCompressedTokenBalancesByOwnerV2Response, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenBalancesByOwnerV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenBalancesByOwnerV2ResponseError, + > for super::PostGetCompressedTokenBalancesByOwnerV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseError, + > for PostGetCompressedTokenBalancesByOwnerV2ResponseError { + fn from( + value: super::PostGetCompressedTokenBalancesByOwnerV2ResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressedTokenBalancesByOwnerV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::TokenBalanceListV2, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressedTokenBalancesByOwnerV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressedTokenBalancesByOwnerV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressedTokenBalancesByOwnerV2ResponseResult, + > for super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressedTokenBalancesByOwnerV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult, + > for PostGetCompressedTokenBalancesByOwnerV2ResponseResult { + fn from( + value: super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountBody { + id: ::std::result::Result< + super::PostGetCompressionSignaturesForAccountBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressionSignaturesForAccountBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressionSignaturesForAccountBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressionSignaturesForAccountBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressionSignaturesForAccountBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressionSignaturesForAccountBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAccountBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAccountBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAccountBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAccountBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForAccountBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAccountBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressionSignaturesForAccountBody { + fn from(value: super::PostGetCompressionSignaturesForAccountBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountBodyParams { + hash: ::std::result::Result, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForAccountBodyParams { + fn default() -> Self { + Self { + hash: Err("no value supplied for hash".to_string()), + } + } + } + impl PostGetCompressionSignaturesForAccountBodyParams { + pub fn hash(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.hash = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hash: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForAccountBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAccountBodyParams, + ) -> ::std::result::Result { + Ok(Self { hash: value.hash? }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForAccountBodyParams, + > for PostGetCompressionSignaturesForAccountBodyParams { + fn from( + value: super::PostGetCompressionSignaturesForAccountBodyParams, + ) -> Self { + Self { hash: Ok(value.hash) } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressionSignaturesForAccountResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressionSignaturesForAccountResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressionSignaturesForAccountResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressionSignaturesForAccountResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressionSignaturesForAccountResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForAccountResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressionSignaturesForAccountResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAccountResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAccountResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressionSignaturesForAccountResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForAccountResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAccountResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressionSignaturesForAccountResponse { + fn from( + value: super::PostGetCompressionSignaturesForAccountResponse, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForAccountResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForAccountResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForAccountResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAccountResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForAccountResponseError, + > for PostGetCompressionSignaturesForAccountResponseError { + fn from( + value: super::PostGetCompressionSignaturesForAccountResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAccountResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::SignatureInfoList, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForAccountResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressionSignaturesForAccountResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressionSignaturesForAccountResponseResult, + > for super::PostGetCompressionSignaturesForAccountResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAccountResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForAccountResponseResult, + > for PostGetCompressionSignaturesForAccountResponseResult { + fn from( + value: super::PostGetCompressionSignaturesForAccountResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAddressBody { + id: ::std::result::Result< + super::PostGetCompressionSignaturesForAddressBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressionSignaturesForAddressBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressionSignaturesForAddressBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressionSignaturesForAddressBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressionSignaturesForAddressBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressionSignaturesForAddressBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAddressBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAddressBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAddressBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAddressBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForAddressBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAddressBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressionSignaturesForAddressBody { + fn from(value: super::PostGetCompressionSignaturesForAddressBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAddressBodyParams { + address: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + cursor: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForAddressBodyParams { + fn default() -> Self { + Self { + address: Err("no value supplied for address".to_string()), + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForAddressBodyParams { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForAddressBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAddressBodyParams, + ) -> ::std::result::Result { + Ok(Self { + address: value.address?, + cursor: value.cursor?, + limit: value.limit?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForAddressBodyParams, + > for PostGetCompressionSignaturesForAddressBodyParams { + fn from( + value: super::PostGetCompressionSignaturesForAddressBodyParams, + ) -> Self { + Self { + address: Ok(value.address), + cursor: Ok(value.cursor), + limit: Ok(value.limit), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAddressResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressionSignaturesForAddressResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressionSignaturesForAddressResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressionSignaturesForAddressResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressionSignaturesForAddressResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressionSignaturesForAddressResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForAddressResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressionSignaturesForAddressResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAddressResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForAddressResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressionSignaturesForAddressResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForAddressResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAddressResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressionSignaturesForAddressResponse { + fn from( + value: super::PostGetCompressionSignaturesForAddressResponse, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAddressResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForAddressResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForAddressResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForAddressResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAddressResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForAddressResponseError, + > for PostGetCompressionSignaturesForAddressResponseError { + fn from( + value: super::PostGetCompressionSignaturesForAddressResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForAddressResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::PaginatedSignatureInfoList, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForAddressResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressionSignaturesForAddressResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressionSignaturesForAddressResponseResult, + > for super::PostGetCompressionSignaturesForAddressResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForAddressResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForAddressResponseResult, + > for PostGetCompressionSignaturesForAddressResponseResult { + fn from( + value: super::PostGetCompressionSignaturesForAddressResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForOwnerBody { + id: ::std::result::Result< + super::PostGetCompressionSignaturesForOwnerBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressionSignaturesForOwnerBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressionSignaturesForOwnerBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressionSignaturesForOwnerBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressionSignaturesForOwnerBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressionSignaturesForOwnerBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForOwnerBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForOwnerBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForOwnerBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForOwnerBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForOwnerBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForOwnerBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressionSignaturesForOwnerBody { + fn from(value: super::PostGetCompressionSignaturesForOwnerBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForOwnerBodyParams { + cursor: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressionSignaturesForOwnerBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressionSignaturesForOwnerBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForOwnerBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForOwnerBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From + for PostGetCompressionSignaturesForOwnerBodyParams { + fn from( + value: super::PostGetCompressionSignaturesForOwnerBodyParams, + ) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForOwnerResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressionSignaturesForOwnerResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressionSignaturesForOwnerResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressionSignaturesForOwnerResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressionSignaturesForOwnerResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressionSignaturesForOwnerResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForOwnerResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressionSignaturesForOwnerResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForOwnerResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForOwnerResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressionSignaturesForOwnerResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForOwnerResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForOwnerResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetCompressionSignaturesForOwnerResponse { + fn from(value: super::PostGetCompressionSignaturesForOwnerResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForOwnerResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForOwnerResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForOwnerResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForOwnerResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForOwnerResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForOwnerResponseError, + > for PostGetCompressionSignaturesForOwnerResponseError { + fn from( + value: super::PostGetCompressionSignaturesForOwnerResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForOwnerResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::PaginatedSignatureInfoList, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForOwnerResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressionSignaturesForOwnerResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForOwnerResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForOwnerResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForOwnerResponseResult, + > for PostGetCompressionSignaturesForOwnerResponseResult { + fn from( + value: super::PostGetCompressionSignaturesForOwnerResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForTokenOwnerBody { + id: ::std::result::Result< + super::PostGetCompressionSignaturesForTokenOwnerBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetCompressionSignaturesForTokenOwnerBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetCompressionSignaturesForTokenOwnerBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetCompressionSignaturesForTokenOwnerBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetCompressionSignaturesForTokenOwnerBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForTokenOwnerBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForTokenOwnerBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForTokenOwnerBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForTokenOwnerBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForTokenOwnerBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetCompressionSignaturesForTokenOwnerBody { + fn from( + value: super::PostGetCompressionSignaturesForTokenOwnerBody, + ) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForTokenOwnerBodyParams { + cursor: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForTokenOwnerBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + owner: Err("no value supplied for owner".to_string()), + } + } + } + impl PostGetCompressionSignaturesForTokenOwnerBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForTokenOwnerBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForTokenOwnerBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + owner: value.owner?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForTokenOwnerBodyParams, + > for PostGetCompressionSignaturesForTokenOwnerBodyParams { + fn from( + value: super::PostGetCompressionSignaturesForTokenOwnerBodyParams, + ) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + owner: Ok(value.owner), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForTokenOwnerResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressionSignaturesForTokenOwnerResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetCompressionSignaturesForTokenOwnerResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetCompressionSignaturesForTokenOwnerResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForTokenOwnerResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForTokenOwnerResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressionSignaturesForTokenOwnerResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForTokenOwnerResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetCompressionSignaturesForTokenOwnerResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetCompressionSignaturesForTokenOwnerResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForTokenOwnerResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForTokenOwnerResponse, + > for PostGetCompressionSignaturesForTokenOwnerResponse { + fn from( + value: super::PostGetCompressionSignaturesForTokenOwnerResponse, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForTokenOwnerResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForTokenOwnerResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetCompressionSignaturesForTokenOwnerResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressionSignaturesForTokenOwnerResponseError, + > for super::PostGetCompressionSignaturesForTokenOwnerResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForTokenOwnerResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForTokenOwnerResponseError, + > for PostGetCompressionSignaturesForTokenOwnerResponseError { + fn from( + value: super::PostGetCompressionSignaturesForTokenOwnerResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetCompressionSignaturesForTokenOwnerResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::PaginatedSignatureInfoList, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetCompressionSignaturesForTokenOwnerResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetCompressionSignaturesForTokenOwnerResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetCompressionSignaturesForTokenOwnerResponseResult, + > for super::PostGetCompressionSignaturesForTokenOwnerResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetCompressionSignaturesForTokenOwnerResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetCompressionSignaturesForTokenOwnerResponseResult, + > for PostGetCompressionSignaturesForTokenOwnerResponseResult { + fn from( + value: super::PostGetCompressionSignaturesForTokenOwnerResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetIndexerHealthBody { + id: ::std::result::Result< + super::PostGetIndexerHealthBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetIndexerHealthBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetIndexerHealthBodyMethod, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetIndexerHealthBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + } + } + } + impl PostGetIndexerHealthBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetIndexerHealthBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetIndexerHealthBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + }) + } + } + impl ::std::convert::From + for PostGetIndexerHealthBody { + fn from(value: super::PostGetIndexerHealthBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetIndexerHealthResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetIndexerHealthResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetIndexerHealthResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + super::PostGetIndexerHealthResponseResult, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetIndexerHealthResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok( + super::defaults::post_get_indexer_health_response_result(), + ), + } + } + } + impl PostGetIndexerHealthResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetIndexerHealthResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetIndexerHealthResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetIndexerHealthResponse { + fn from(value: super::PostGetIndexerHealthResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetIndexerHealthResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetIndexerHealthResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetIndexerHealthResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetIndexerHealthResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetIndexerHealthResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetIndexerHealthResponseError { + fn from(value: super::PostGetIndexerHealthResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetIndexerSlotBody { + id: ::std::result::Result< + super::PostGetIndexerSlotBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetIndexerSlotBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetIndexerSlotBodyMethod, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetIndexerSlotBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + } + } + } + impl PostGetIndexerSlotBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetIndexerSlotBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetIndexerSlotBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + }) + } + } + impl ::std::convert::From + for PostGetIndexerSlotBody { + fn from(value: super::PostGetIndexerSlotBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetIndexerSlotResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetIndexerSlotResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetIndexerSlotResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result, + } + impl ::std::default::Default for PostGetIndexerSlotResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(super::defaults::default_u64::()), + } + } + } + impl PostGetIndexerSlotResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetIndexerSlotResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetIndexerSlotResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetIndexerSlotResponse { + fn from(value: super::PostGetIndexerSlotResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetIndexerSlotResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetIndexerSlotResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetIndexerSlotResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetIndexerSlotResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetIndexerSlotResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetIndexerSlotResponseError { + fn from(value: super::PostGetIndexerSlotResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestCompressionSignaturesBody { + id: ::std::result::Result< + super::PostGetLatestCompressionSignaturesBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetLatestCompressionSignaturesBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetLatestCompressionSignaturesBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetLatestCompressionSignaturesBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetLatestCompressionSignaturesBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetLatestCompressionSignaturesBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestCompressionSignaturesBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestCompressionSignaturesBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestCompressionSignaturesBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestCompressionSignaturesBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestCompressionSignaturesBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestCompressionSignaturesBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetLatestCompressionSignaturesBody { + fn from(value: super::PostGetLatestCompressionSignaturesBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestCompressionSignaturesBodyParams { + cursor: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetLatestCompressionSignaturesBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + } + } + } + impl PostGetLatestCompressionSignaturesBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestCompressionSignaturesBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestCompressionSignaturesBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + }) + } + } + impl ::std::convert::From + for PostGetLatestCompressionSignaturesBodyParams { + fn from(value: super::PostGetLatestCompressionSignaturesBodyParams) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestCompressionSignaturesResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetLatestCompressionSignaturesResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetLatestCompressionSignaturesResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetLatestCompressionSignaturesResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetLatestCompressionSignaturesResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetLatestCompressionSignaturesResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetLatestCompressionSignaturesResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetLatestCompressionSignaturesResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestCompressionSignaturesResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestCompressionSignaturesResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetLatestCompressionSignaturesResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestCompressionSignaturesResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestCompressionSignaturesResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetLatestCompressionSignaturesResponse { + fn from(value: super::PostGetLatestCompressionSignaturesResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestCompressionSignaturesResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetLatestCompressionSignaturesResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetLatestCompressionSignaturesResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestCompressionSignaturesResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestCompressionSignaturesResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetLatestCompressionSignaturesResponseError { + fn from( + value: super::PostGetLatestCompressionSignaturesResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestCompressionSignaturesResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::PaginatedSignatureInfoList, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetLatestCompressionSignaturesResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetLatestCompressionSignaturesResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestCompressionSignaturesResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestCompressionSignaturesResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetLatestCompressionSignaturesResponseResult, + > for PostGetLatestCompressionSignaturesResponseResult { + fn from( + value: super::PostGetLatestCompressionSignaturesResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestNonVotingSignaturesBody { + id: ::std::result::Result< + super::PostGetLatestNonVotingSignaturesBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetLatestNonVotingSignaturesBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetLatestNonVotingSignaturesBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetLatestNonVotingSignaturesBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetLatestNonVotingSignaturesBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetLatestNonVotingSignaturesBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestNonVotingSignaturesBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestNonVotingSignaturesBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestNonVotingSignaturesBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestNonVotingSignaturesBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestNonVotingSignaturesBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestNonVotingSignaturesBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetLatestNonVotingSignaturesBody { + fn from(value: super::PostGetLatestNonVotingSignaturesBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestNonVotingSignaturesBodyParams { + cursor: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + limit: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetLatestNonVotingSignaturesBodyParams { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + limit: Ok(Default::default()), + } + } + } + impl PostGetLatestNonVotingSignaturesBodyParams { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestNonVotingSignaturesBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestNonVotingSignaturesBodyParams, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + limit: value.limit?, + }) + } + } + impl ::std::convert::From + for PostGetLatestNonVotingSignaturesBodyParams { + fn from(value: super::PostGetLatestNonVotingSignaturesBodyParams) -> Self { + Self { + cursor: Ok(value.cursor), + limit: Ok(value.limit), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestNonVotingSignaturesResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetLatestNonVotingSignaturesResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetLatestNonVotingSignaturesResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetLatestNonVotingSignaturesResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetLatestNonVotingSignaturesResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetLatestNonVotingSignaturesResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetLatestNonVotingSignaturesResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetLatestNonVotingSignaturesResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestNonVotingSignaturesResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetLatestNonVotingSignaturesResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetLatestNonVotingSignaturesResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestNonVotingSignaturesResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestNonVotingSignaturesResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetLatestNonVotingSignaturesResponse { + fn from(value: super::PostGetLatestNonVotingSignaturesResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestNonVotingSignaturesResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetLatestNonVotingSignaturesResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetLatestNonVotingSignaturesResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestNonVotingSignaturesResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestNonVotingSignaturesResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetLatestNonVotingSignaturesResponseError { + fn from( + value: super::PostGetLatestNonVotingSignaturesResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetLatestNonVotingSignaturesResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::SignatureInfoListWithError, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetLatestNonVotingSignaturesResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetLatestNonVotingSignaturesResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetLatestNonVotingSignaturesResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetLatestNonVotingSignaturesResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetLatestNonVotingSignaturesResponseResult { + fn from( + value: super::PostGetLatestNonVotingSignaturesResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesBody { + id: ::std::result::Result< + super::PostGetMultipleAccountInterfacesBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleAccountInterfacesBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetMultipleAccountInterfacesBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetMultipleAccountInterfacesBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleAccountInterfacesBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetMultipleAccountInterfacesBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleAccountInterfacesBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleAccountInterfacesBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleAccountInterfacesBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleAccountInterfacesBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleAccountInterfacesBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleAccountInterfacesBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleAccountInterfacesBody { + fn from(value: super::PostGetMultipleAccountInterfacesBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesBodyParams { + addresses: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleAccountInterfacesBodyParams { + fn default() -> Self { + Self { + addresses: Err("no value supplied for addresses".to_string()), + } + } + } + impl PostGetMultipleAccountInterfacesBodyParams { + pub fn addresses(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.addresses = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for addresses: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleAccountInterfacesBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleAccountInterfacesBodyParams, + ) -> ::std::result::Result { + Ok(Self { + addresses: value.addresses?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleAccountInterfacesBodyParams { + fn from(value: super::PostGetMultipleAccountInterfacesBodyParams) -> Self { + Self { + addresses: Ok(value.addresses), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleAccountInterfacesResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetMultipleAccountInterfacesResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleAccountInterfacesResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleAccountInterfacesResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleAccountInterfacesResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetMultipleAccountInterfacesResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleAccountInterfacesResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleAccountInterfacesResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleAccountInterfacesResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleAccountInterfacesResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleAccountInterfacesResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleAccountInterfacesResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleAccountInterfacesResponse { + fn from(value: super::PostGetMultipleAccountInterfacesResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleAccountInterfacesResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetMultipleAccountInterfacesResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleAccountInterfacesResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleAccountInterfacesResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleAccountInterfacesResponseError { + fn from( + value: super::PostGetMultipleAccountInterfacesResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleAccountInterfacesResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::vec::Vec<::std::option::Option>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleAccountInterfacesResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetMultipleAccountInterfacesResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec<::std::option::Option>, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleAccountInterfacesResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleAccountInterfacesResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleAccountInterfacesResponseResult { + fn from( + value: super::PostGetMultipleAccountInterfacesResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsBody { + id: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountProofsBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetMultipleCompressedAccountProofsBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountProofsBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountProofsBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountProofsBody { + fn from(value: super::PostGetMultipleCompressedAccountProofsBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleCompressedAccountProofsResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleCompressedAccountProofsResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountProofsResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountProofsResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleCompressedAccountProofsResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleCompressedAccountProofsResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountProofsResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountProofsResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountProofsResponse { + fn from( + value: super::PostGetMultipleCompressedAccountProofsResponse, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountProofsResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountProofsResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountProofsResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountProofsResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetMultipleCompressedAccountProofsResponseError, + > for PostGetMultipleCompressedAccountProofsResponseError { + fn from( + value: super::PostGetMultipleCompressedAccountProofsResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountProofsResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetMultipleCompressedAccountProofsResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetMultipleCompressedAccountProofsResponseResult, + > for super::PostGetMultipleCompressedAccountProofsResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountProofsResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetMultipleCompressedAccountProofsResponseResult, + > for PostGetMultipleCompressedAccountProofsResponseResult { + fn from( + value: super::PostGetMultipleCompressedAccountProofsResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsV2Body { + id: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountProofsV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetMultipleCompressedAccountProofsV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsV2BodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountProofsV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountProofsV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountProofsV2Body { + fn from(value: super::PostGetMultipleCompressedAccountProofsV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleCompressedAccountProofsV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleCompressedAccountProofsV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountProofsV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountProofsV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleCompressedAccountProofsV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleCompressedAccountProofsV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountProofsV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountProofsV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From< + super::PostGetMultipleCompressedAccountProofsV2Response, + > for PostGetMultipleCompressedAccountProofsV2Response { + fn from( + value: super::PostGetMultipleCompressedAccountProofsV2Response, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountProofsV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountProofsV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetMultipleCompressedAccountProofsV2ResponseError, + > for super::PostGetMultipleCompressedAccountProofsV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountProofsV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetMultipleCompressedAccountProofsV2ResponseError, + > for PostGetMultipleCompressedAccountProofsV2ResponseError { + fn from( + value: super::PostGetMultipleCompressedAccountProofsV2ResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountProofsV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountProofsV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetMultipleCompressedAccountProofsV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetMultipleCompressedAccountProofsV2ResponseResult, + > for super::PostGetMultipleCompressedAccountProofsV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountProofsV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetMultipleCompressedAccountProofsV2ResponseResult, + > for PostGetMultipleCompressedAccountProofsV2ResponseResult { + fn from( + value: super::PostGetMultipleCompressedAccountProofsV2ResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsBody { + id: ::std::result::Result< + super::PostGetMultipleCompressedAccountsBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleCompressedAccountsBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetMultipleCompressedAccountsBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetMultipleCompressedAccountsBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetMultipleCompressedAccountsBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountsBody { + fn from(value: super::PostGetMultipleCompressedAccountsBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsBodyParams { + addresses: ::std::result::Result< + ::std::option::Option<::std::vec::Vec>, + ::std::string::String, + >, + hashes: ::std::result::Result< + ::std::option::Option<::std::vec::Vec>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsBodyParams { + fn default() -> Self { + Self { + addresses: Ok(Default::default()), + hashes: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountsBodyParams { + pub fn addresses(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec>, + >, + T::Error: ::std::fmt::Display, + { + self.addresses = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for addresses: {e}") + }); + self + } + pub fn hashes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec>, + >, + T::Error: ::std::fmt::Display, + { + self.hashes = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hashes: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsBodyParams, + ) -> ::std::result::Result { + Ok(Self { + addresses: value.addresses?, + hashes: value.hashes?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountsBodyParams { + fn from(value: super::PostGetMultipleCompressedAccountsBodyParams) -> Self { + Self { + addresses: Ok(value.addresses), + hashes: Ok(value.hashes), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleCompressedAccountsResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetMultipleCompressedAccountsResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleCompressedAccountsResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleCompressedAccountsResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountsResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleCompressedAccountsResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleCompressedAccountsResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountsResponse { + fn from(value: super::PostGetMultipleCompressedAccountsResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountsResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountsResponseError { + fn from( + value: super::PostGetMultipleCompressedAccountsResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsResponseResult { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountsResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetMultipleCompressedAccountsResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountsResponseResult { + fn from( + value: super::PostGetMultipleCompressedAccountsResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsV2Body { + id: ::std::result::Result< + super::PostGetMultipleCompressedAccountsV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleCompressedAccountsV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetMultipleCompressedAccountsV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetMultipleCompressedAccountsV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetMultipleCompressedAccountsV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsV2BodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsV2BodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountsV2Body { + fn from(value: super::PostGetMultipleCompressedAccountsV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsV2BodyParams { + addresses: ::std::result::Result< + ::std::option::Option<::std::vec::Vec>, + ::std::string::String, + >, + hashes: ::std::result::Result< + ::std::option::Option<::std::vec::Vec>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsV2BodyParams { + fn default() -> Self { + Self { + addresses: Ok(Default::default()), + hashes: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountsV2BodyParams { + pub fn addresses(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec>, + >, + T::Error: ::std::fmt::Display, + { + self.addresses = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for addresses: {e}") + }); + self + } + pub fn hashes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec>, + >, + T::Error: ::std::fmt::Display, + { + self.hashes = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hashes: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { + addresses: value.addresses?, + hashes: value.hashes?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountsV2BodyParams { + fn from( + value: super::PostGetMultipleCompressedAccountsV2BodyParams, + ) -> Self { + Self { + addresses: Ok(value.addresses), + hashes: Ok(value.hashes), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleCompressedAccountsV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetMultipleCompressedAccountsV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleCompressedAccountsV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleCompressedAccountsV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleCompressedAccountsV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountsV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleCompressedAccountsV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleCompressedAccountsV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleCompressedAccountsV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleCompressedAccountsV2Response { + fn from(value: super::PostGetMultipleCompressedAccountsV2Response) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountsV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetMultipleCompressedAccountsV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetMultipleCompressedAccountsV2ResponseError, + > for PostGetMultipleCompressedAccountsV2ResponseError { + fn from( + value: super::PostGetMultipleCompressedAccountsV2ResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleCompressedAccountsV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result, + } + impl ::std::default::Default + for PostGetMultipleCompressedAccountsV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetMultipleCompressedAccountsV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleCompressedAccountsV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleCompressedAccountsV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From< + super::PostGetMultipleCompressedAccountsV2ResponseResult, + > for PostGetMultipleCompressedAccountsV2ResponseResult { + fn from( + value: super::PostGetMultipleCompressedAccountsV2ResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsBody { + id: ::std::result::Result< + super::PostGetMultipleNewAddressProofsBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleNewAddressProofsBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetMultipleNewAddressProofsBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetMultipleNewAddressProofsBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleNewAddressProofsBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleNewAddressProofsBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleNewAddressProofsBody { + fn from(value: super::PostGetMultipleNewAddressProofsBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleNewAddressProofsResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetMultipleNewAddressProofsResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleNewAddressProofsResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleNewAddressProofsResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetMultipleNewAddressProofsResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleNewAddressProofsResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleNewAddressProofsResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleNewAddressProofsResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleNewAddressProofsResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleNewAddressProofsResponse { + fn from(value: super::PostGetMultipleNewAddressProofsResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetMultipleNewAddressProofsResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleNewAddressProofsResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleNewAddressProofsResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleNewAddressProofsResponseError { + fn from(value: super::PostGetMultipleNewAddressProofsResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetMultipleNewAddressProofsResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleNewAddressProofsResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleNewAddressProofsResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleNewAddressProofsResponseResult { + fn from( + value: super::PostGetMultipleNewAddressProofsResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsV2Body { + id: ::std::result::Result< + super::PostGetMultipleNewAddressProofsV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleNewAddressProofsV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetMultipleNewAddressProofsV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetMultipleNewAddressProofsV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsV2BodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleNewAddressProofsV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleNewAddressProofsV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleNewAddressProofsV2Body { + fn from(value: super::PostGetMultipleNewAddressProofsV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleNewAddressProofsV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetMultipleNewAddressProofsV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetMultipleNewAddressProofsV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetMultipleNewAddressProofsV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetMultipleNewAddressProofsV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleNewAddressProofsV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetMultipleNewAddressProofsV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetMultipleNewAddressProofsV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleNewAddressProofsV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleNewAddressProofsV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleNewAddressProofsV2Response { + fn from(value: super::PostGetMultipleNewAddressProofsV2Response) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetMultipleNewAddressProofsV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetMultipleNewAddressProofsV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleNewAddressProofsV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleNewAddressProofsV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleNewAddressProofsV2ResponseError { + fn from( + value: super::PostGetMultipleNewAddressProofsV2ResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetMultipleNewAddressProofsV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetMultipleNewAddressProofsV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetMultipleNewAddressProofsV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetMultipleNewAddressProofsV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetMultipleNewAddressProofsV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetMultipleNewAddressProofsV2ResponseResult { + fn from( + value: super::PostGetMultipleNewAddressProofsV2ResponseResult, + ) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueElementsBody { + id: ::std::result::Result< + super::PostGetQueueElementsBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetQueueElementsBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetQueueElementsBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetQueueElementsBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetQueueElementsBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetQueueElementsBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueElementsBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueElementsBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetQueueElementsBody { + fn from(value: super::PostGetQueueElementsBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueElementsBodyParams { + address_queue: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + input_queue: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + output_queue: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + tree: ::std::result::Result, + } + impl ::std::default::Default for PostGetQueueElementsBodyParams { + fn default() -> Self { + Self { + address_queue: Ok(Default::default()), + input_queue: Ok(Default::default()), + output_queue: Ok(Default::default()), + tree: Err("no value supplied for tree".to_string()), + } + } + } + impl PostGetQueueElementsBodyParams { + pub fn address_queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.address_queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address_queue: {e}") + }); + self + } + pub fn input_queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.input_queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for input_queue: {e}") + }); + self + } + pub fn output_queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.output_queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for output_queue: {e}") + }); + self + } + pub fn tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueElementsBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueElementsBodyParams, + ) -> ::std::result::Result { + Ok(Self { + address_queue: value.address_queue?, + input_queue: value.input_queue?, + output_queue: value.output_queue?, + tree: value.tree?, + }) + } + } + impl ::std::convert::From + for PostGetQueueElementsBodyParams { + fn from(value: super::PostGetQueueElementsBodyParams) -> Self { + Self { + address_queue: Ok(value.address_queue), + input_queue: Ok(value.input_queue), + output_queue: Ok(value.output_queue), + tree: Ok(value.tree), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueElementsResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetQueueElementsResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetQueueElementsResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetQueueElementsResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetQueueElementsResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueElementsResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueElementsResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetQueueElementsResponse { + fn from(value: super::PostGetQueueElementsResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueElementsResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetQueueElementsResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetQueueElementsResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueElementsResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueElementsResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetQueueElementsResponseError { + fn from(value: super::PostGetQueueElementsResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueElementsResponseResult { + address_queue: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + context: ::std::result::Result, + state_queue: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetQueueElementsResponseResult { + fn default() -> Self { + Self { + address_queue: Ok(Default::default()), + context: Err("no value supplied for context".to_string()), + state_queue: Ok(Default::default()), + } + } + } + impl PostGetQueueElementsResponseResult { + pub fn address_queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.address_queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address_queue: {e}") + }); + self + } + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn state_queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.state_queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for state_queue: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueElementsResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueElementsResponseResult, + ) -> ::std::result::Result { + Ok(Self { + address_queue: value.address_queue?, + context: value.context?, + state_queue: value.state_queue?, + }) + } + } + impl ::std::convert::From + for PostGetQueueElementsResponseResult { + fn from(value: super::PostGetQueueElementsResponseResult) -> Self { + Self { + address_queue: Ok(value.address_queue), + context: Ok(value.context), + state_queue: Ok(value.state_queue), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueInfoBody { + id: ::std::result::Result< + super::PostGetQueueInfoBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetQueueInfoBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetQueueInfoBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetQueueInfoBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetQueueInfoBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetQueueInfoBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueInfoBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueInfoBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From for PostGetQueueInfoBody { + fn from(value: super::PostGetQueueInfoBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueInfoBodyParams { + trees: ::std::result::Result< + ::std::option::Option<::std::vec::Vec<::std::string::String>>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetQueueInfoBodyParams { + fn default() -> Self { + Self { + trees: Ok(Default::default()), + } + } + } + impl PostGetQueueInfoBodyParams { + pub fn trees(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<::std::string::String>>, + >, + T::Error: ::std::fmt::Display, + { + self.trees = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for trees: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueInfoBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueInfoBodyParams, + ) -> ::std::result::Result { + Ok(Self { trees: value.trees? }) + } + } + impl ::std::convert::From + for PostGetQueueInfoBodyParams { + fn from(value: super::PostGetQueueInfoBodyParams) -> Self { + Self { trees: Ok(value.trees) } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueInfoResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetQueueInfoResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetQueueInfoResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetQueueInfoResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetQueueInfoResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueInfoResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueInfoResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetQueueInfoResponse { + fn from(value: super::PostGetQueueInfoResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueInfoResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetQueueInfoResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetQueueInfoResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueInfoResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueInfoResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetQueueInfoResponseError { + fn from(value: super::PostGetQueueInfoResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetQueueInfoResponseResult { + queues: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + slot: ::std::result::Result, + } + impl ::std::default::Default for PostGetQueueInfoResponseResult { + fn default() -> Self { + Self { + queues: Err("no value supplied for queues".to_string()), + slot: Err("no value supplied for slot".to_string()), + } + } + } + impl PostGetQueueInfoResponseResult { + pub fn queues(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.queues = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queues: {e}") + }); + self + } + pub fn slot(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.slot = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for slot: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetQueueInfoResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetQueueInfoResponseResult, + ) -> ::std::result::Result { + Ok(Self { + queues: value.queues?, + slot: value.slot?, + }) + } + } + impl ::std::convert::From + for PostGetQueueInfoResponseResult { + fn from(value: super::PostGetQueueInfoResponseResult) -> Self { + Self { + queues: Ok(value.queues), + slot: Ok(value.slot), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfaceBody { + id: ::std::result::Result< + super::PostGetTokenAccountInterfaceBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetTokenAccountInterfaceBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetTokenAccountInterfaceBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetTokenAccountInterfaceBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfaceBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetTokenAccountInterfaceBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfaceBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfaceBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfaceBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfaceBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfaceBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfaceBody { + fn from(value: super::PostGetTokenAccountInterfaceBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfaceBodyParams { + address: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfaceBodyParams { + fn default() -> Self { + Self { + address: Err("no value supplied for address".to_string()), + } + } + } + impl PostGetTokenAccountInterfaceBodyParams { + pub fn address(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.address = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for address: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfaceBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfaceBodyParams, + ) -> ::std::result::Result { + Ok(Self { address: value.address? }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfaceBodyParams { + fn from(value: super::PostGetTokenAccountInterfaceBodyParams) -> Self { + Self { address: Ok(value.address) } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfaceResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetTokenAccountInterfaceResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetTokenAccountInterfaceResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfaceResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetTokenAccountInterfaceResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTokenAccountInterfaceResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfaceResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfaceResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTokenAccountInterfaceResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfaceResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfaceResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfaceResponse { + fn from(value: super::PostGetTokenAccountInterfaceResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfaceResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfaceResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetTokenAccountInterfaceResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfaceResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfaceResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfaceResponseError { + fn from(value: super::PostGetTokenAccountInterfaceResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfaceResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfaceResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Ok(Default::default()), + } + } + } + impl PostGetTokenAccountInterfaceResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfaceResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfaceResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfaceResponseResult { + fn from(value: super::PostGetTokenAccountInterfaceResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfacesBody { + id: ::std::result::Result< + super::PostGetTokenAccountInterfacesBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetTokenAccountInterfacesBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetTokenAccountInterfacesBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetTokenAccountInterfacesBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfacesBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetTokenAccountInterfacesBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfacesBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfacesBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfacesBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfacesBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfacesBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfacesBody { + fn from(value: super::PostGetTokenAccountInterfacesBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfacesBodyParams { + addresses: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfacesBodyParams { + fn default() -> Self { + Self { + addresses: Err("no value supplied for addresses".to_string()), + } + } + } + impl PostGetTokenAccountInterfacesBodyParams { + pub fn addresses(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.addresses = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for addresses: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfacesBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfacesBodyParams, + ) -> ::std::result::Result { + Ok(Self { + addresses: value.addresses?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfacesBodyParams { + fn from(value: super::PostGetTokenAccountInterfacesBodyParams) -> Self { + Self { + addresses: Ok(value.addresses), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfacesResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetTokenAccountInterfacesResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetTokenAccountInterfacesResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetTokenAccountInterfacesResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfacesResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetTokenAccountInterfacesResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTokenAccountInterfacesResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfacesResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTokenAccountInterfacesResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTokenAccountInterfacesResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfacesResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfacesResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfacesResponse { + fn from(value: super::PostGetTokenAccountInterfacesResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfacesResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfacesResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetTokenAccountInterfacesResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfacesResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfacesResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfacesResponseError { + fn from(value: super::PostGetTokenAccountInterfacesResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTokenAccountInterfacesResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + ::std::vec::Vec<::std::option::Option>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTokenAccountInterfacesResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetTokenAccountInterfacesResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec<::std::option::Option>, + >, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTokenAccountInterfacesResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTokenAccountInterfacesResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetTokenAccountInterfacesResponseResult { + fn from(value: super::PostGetTokenAccountInterfacesResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoBody { + id: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTransactionWithCompressionInfoBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetTransactionWithCompressionInfoBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoBodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoBodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoBodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoBodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTransactionWithCompressionInfoBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetTransactionWithCompressionInfoBody { + fn from(value: super::PostGetTransactionWithCompressionInfoBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoBodyParams { + signature: ::std::result::Result< + super::SerializableSignature, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoBodyParams { + fn default() -> Self { + Self { + signature: Err("no value supplied for signature".to_string()), + } + } + } + impl PostGetTransactionWithCompressionInfoBodyParams { + pub fn signature(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.signature = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for signature: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTransactionWithCompressionInfoBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoBodyParams, + ) -> ::std::result::Result { + Ok(Self { + signature: value.signature?, + }) + } + } + impl ::std::convert::From + for PostGetTransactionWithCompressionInfoBodyParams { + fn from( + value: super::PostGetTransactionWithCompressionInfoBodyParams, + ) -> Self { + Self { + signature: Ok(value.signature), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoResponse { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTransactionWithCompressionInfoResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetTransactionWithCompressionInfoResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTransactionWithCompressionInfoResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetTransactionWithCompressionInfoResponse { + fn from( + value: super::PostGetTransactionWithCompressionInfoResponse, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetTransactionWithCompressionInfoResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTransactionWithCompressionInfoResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetTransactionWithCompressionInfoResponseError, + > for PostGetTransactionWithCompressionInfoResponseError { + fn from( + value: super::PostGetTransactionWithCompressionInfoResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoResponseResult { + compression_info: ::std::result::Result< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo, + >, + ::std::string::String, + >, + transaction: ::std::result::Result< + ::serde_json::Map<::std::string::String, ::serde_json::Value>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoResponseResult { + fn default() -> Self { + Self { + compression_info: Ok(Default::default()), + transaction: Ok(Default::default()), + } + } + } + impl PostGetTransactionWithCompressionInfoResponseResult { + pub fn compression_info(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo, + >, + >, + T::Error: ::std::fmt::Display, + { + self.compression_info = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for compression_info: {e}" + ) + }); + self + } + pub fn transaction(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::serde_json::Map<::std::string::String, ::serde_json::Value>, + >, + T::Error: ::std::fmt::Display, + { + self.transaction = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for transaction: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTransactionWithCompressionInfoResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoResponseResult, + ) -> ::std::result::Result { + Ok(Self { + compression_info: value.compression_info?, + transaction: value.transaction?, + }) + } + } + impl ::std::convert::From< + super::PostGetTransactionWithCompressionInfoResponseResult, + > for PostGetTransactionWithCompressionInfoResponseResult { + fn from( + value: super::PostGetTransactionWithCompressionInfoResponseResult, + ) -> Self { + Self { + compression_info: Ok(value.compression_info), + transaction: Ok(value.transaction), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoResponseResultCompressionInfo { + closed_accounts: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + opened_accounts: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoResponseResultCompressionInfo { + fn default() -> Self { + Self { + closed_accounts: Err( + "no value supplied for closed_accounts".to_string(), + ), + opened_accounts: Err( + "no value supplied for opened_accounts".to_string(), + ), + } + } + } + impl PostGetTransactionWithCompressionInfoResponseResultCompressionInfo { + pub fn closed_accounts(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.closed_accounts = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for closed_accounts: {e}" + ) + }); + self + } + pub fn opened_accounts(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.opened_accounts = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for opened_accounts: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetTransactionWithCompressionInfoResponseResultCompressionInfo, + > for super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoResponseResultCompressionInfo, + ) -> ::std::result::Result { + Ok(Self { + closed_accounts: value.closed_accounts?, + opened_accounts: value.opened_accounts?, + }) + } + } + impl ::std::convert::From< + super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo, + > for PostGetTransactionWithCompressionInfoResponseResultCompressionInfo { + fn from( + value: super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo, + ) -> Self { + Self { + closed_accounts: Ok(value.closed_accounts), + opened_accounts: Ok(value.opened_accounts), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2Body { + id: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetTransactionWithCompressionInfoV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetTransactionWithCompressionInfoV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoV2BodyId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoV2BodyJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoV2BodyMethod, + >, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoV2BodyParams, + >, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTransactionWithCompressionInfoV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetTransactionWithCompressionInfoV2Body { + fn from(value: super::PostGetTransactionWithCompressionInfoV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2BodyParams { + signature: ::std::result::Result< + super::SerializableSignature, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoV2BodyParams { + fn default() -> Self { + Self { + signature: Err("no value supplied for signature".to_string()), + } + } + } + impl PostGetTransactionWithCompressionInfoV2BodyParams { + pub fn signature(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.signature = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for signature: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTransactionWithCompressionInfoV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { + signature: value.signature?, + }) + } + } + impl ::std::convert::From< + super::PostGetTransactionWithCompressionInfoV2BodyParams, + > for PostGetTransactionWithCompressionInfoV2BodyParams { + fn from( + value: super::PostGetTransactionWithCompressionInfoV2BodyParams, + ) -> Self { + Self { + signature: Ok(value.signature), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2Response { + error: ::std::result::Result< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoV2ResponseError, + >, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetTransactionWithCompressionInfoV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoV2ResponseResult, + >, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetTransactionWithCompressionInfoV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoV2ResponseError, + >, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoV2ResponseId, + >, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + super::PostGetTransactionWithCompressionInfoV2ResponseJsonrpc, + >, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoV2ResponseResult, + >, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetTransactionWithCompressionInfoV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetTransactionWithCompressionInfoV2Response { + fn from( + value: super::PostGetTransactionWithCompressionInfoV2Response, + ) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetTransactionWithCompressionInfoV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetTransactionWithCompressionInfoV2ResponseError, + > for super::PostGetTransactionWithCompressionInfoV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From< + super::PostGetTransactionWithCompressionInfoV2ResponseError, + > for PostGetTransactionWithCompressionInfoV2ResponseError { + fn from( + value: super::PostGetTransactionWithCompressionInfoV2ResponseError, + ) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2ResponseResult { + compression_info: ::std::result::Result< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo, + >, + ::std::string::String, + >, + transaction: ::std::result::Result< + ::serde_json::Map<::std::string::String, ::serde_json::Value>, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoV2ResponseResult { + fn default() -> Self { + Self { + compression_info: Ok(Default::default()), + transaction: Ok(Default::default()), + } + } + } + impl PostGetTransactionWithCompressionInfoV2ResponseResult { + pub fn compression_info(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option< + super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo, + >, + >, + T::Error: ::std::fmt::Display, + { + self.compression_info = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for compression_info: {e}" + ) + }); + self + } + pub fn transaction(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::serde_json::Map<::std::string::String, ::serde_json::Value>, + >, + T::Error: ::std::fmt::Display, + { + self.transaction = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for transaction: {e}") + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetTransactionWithCompressionInfoV2ResponseResult, + > for super::PostGetTransactionWithCompressionInfoV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + compression_info: value.compression_info?, + transaction: value.transaction?, + }) + } + } + impl ::std::convert::From< + super::PostGetTransactionWithCompressionInfoV2ResponseResult, + > for PostGetTransactionWithCompressionInfoV2ResponseResult { + fn from( + value: super::PostGetTransactionWithCompressionInfoV2ResponseResult, + ) -> Self { + Self { + compression_info: Ok(value.compression_info), + transaction: Ok(value.transaction), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo { + closed_accounts: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + opened_accounts: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default + for PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo { + fn default() -> Self { + Self { + closed_accounts: Err( + "no value supplied for closed_accounts".to_string(), + ), + opened_accounts: Err( + "no value supplied for opened_accounts".to_string(), + ), + } + } + } + impl PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo { + pub fn closed_accounts(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.closed_accounts = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for closed_accounts: {e}" + ) + }); + self + } + pub fn opened_accounts(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.opened_accounts = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for opened_accounts: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom< + PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo, + > + for super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo, + ) -> ::std::result::Result { + Ok(Self { + closed_accounts: value.closed_accounts?, + opened_accounts: value.opened_accounts?, + }) + } + } + impl ::std::convert::From< + super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo, + > for PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo { + fn from( + value: super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo, + ) -> Self { + Self { + closed_accounts: Ok(value.closed_accounts), + opened_accounts: Ok(value.opened_accounts), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofBody { + id: ::std::result::Result< + super::PostGetValidityProofBodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetValidityProofBodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetValidityProofBodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetValidityProofBodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofBody { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetValidityProofBody { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofBody { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofBody, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofBody { + fn from(value: super::PostGetValidityProofBody) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofBodyParams { + hashes: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + new_addresses_with_trees: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofBodyParams { + fn default() -> Self { + Self { + hashes: Ok(Default::default()), + new_addresses_with_trees: Ok(Default::default()), + } + } + } + impl PostGetValidityProofBodyParams { + pub fn hashes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.hashes = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hashes: {e}") + }); + self + } + pub fn new_addresses_with_trees(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.new_addresses_with_trees = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for new_addresses_with_trees: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofBodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofBodyParams, + ) -> ::std::result::Result { + Ok(Self { + hashes: value.hashes?, + new_addresses_with_trees: value.new_addresses_with_trees?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofBodyParams { + fn from(value: super::PostGetValidityProofBodyParams) -> Self { + Self { + hashes: Ok(value.hashes), + new_addresses_with_trees: Ok(value.new_addresses_with_trees), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofResponse { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetValidityProofResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetValidityProofResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofResponse { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetValidityProofResponse { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofResponse { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofResponse, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofResponse { + fn from(value: super::PostGetValidityProofResponse) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetValidityProofResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofResponseError { + fn from(value: super::PostGetValidityProofResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::CompressedProofWithContext, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetValidityProofResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofResponseResult { + fn from(value: super::PostGetValidityProofResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofV2Body { + id: ::std::result::Result< + super::PostGetValidityProofV2BodyId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetValidityProofV2BodyJsonrpc, + ::std::string::String, + >, + method: ::std::result::Result< + super::PostGetValidityProofV2BodyMethod, + ::std::string::String, + >, + params: ::std::result::Result< + super::PostGetValidityProofV2BodyParams, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofV2Body { + fn default() -> Self { + Self { + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + method: Err("no value supplied for method".to_string()), + params: Err("no value supplied for params".to_string()), + } + } + } + impl PostGetValidityProofV2Body { + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn method(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.method = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for method: {e}") + }); + self + } + pub fn params(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.params = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for params: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofV2Body { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofV2Body, + ) -> ::std::result::Result { + Ok(Self { + id: value.id?, + jsonrpc: value.jsonrpc?, + method: value.method?, + params: value.params?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofV2Body { + fn from(value: super::PostGetValidityProofV2Body) -> Self { + Self { + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + method: Ok(value.method), + params: Ok(value.params), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofV2BodyParams { + hashes: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + new_addresses_with_trees: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofV2BodyParams { + fn default() -> Self { + Self { + hashes: Ok(Default::default()), + new_addresses_with_trees: Ok(Default::default()), + } + } + } + impl PostGetValidityProofV2BodyParams { + pub fn hashes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.hashes = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for hashes: {e}") + }); + self + } + pub fn new_addresses_with_trees(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.new_addresses_with_trees = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for new_addresses_with_trees: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofV2BodyParams { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofV2BodyParams, + ) -> ::std::result::Result { + Ok(Self { + hashes: value.hashes?, + new_addresses_with_trees: value.new_addresses_with_trees?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofV2BodyParams { + fn from(value: super::PostGetValidityProofV2BodyParams) -> Self { + Self { + hashes: Ok(value.hashes), + new_addresses_with_trees: Ok(value.new_addresses_with_trees), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofV2Response { + error: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + id: ::std::result::Result< + super::PostGetValidityProofV2ResponseId, + ::std::string::String, + >, + jsonrpc: ::std::result::Result< + super::PostGetValidityProofV2ResponseJsonrpc, + ::std::string::String, + >, + result: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofV2Response { + fn default() -> Self { + Self { + error: Ok(Default::default()), + id: Err("no value supplied for id".to_string()), + jsonrpc: Err("no value supplied for jsonrpc".to_string()), + result: Ok(Default::default()), + } + } + } + impl PostGetValidityProofV2Response { + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn id(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.id = value + .try_into() + .map_err(|e| format!("error converting supplied value for id: {e}")); + self + } + pub fn jsonrpc(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.jsonrpc = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for jsonrpc: {e}") + }); + self + } + pub fn result(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.result = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for result: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofV2Response { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofV2Response, + ) -> ::std::result::Result { + Ok(Self { + error: value.error?, + id: value.id?, + jsonrpc: value.jsonrpc?, + result: value.result?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofV2Response { + fn from(value: super::PostGetValidityProofV2Response) -> Self { + Self { + error: Ok(value.error), + id: Ok(value.id), + jsonrpc: Ok(value.jsonrpc), + result: Ok(value.result), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofV2ResponseError { + code: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + message: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofV2ResponseError { + fn default() -> Self { + Self { + code: Ok(Default::default()), + message: Ok(Default::default()), + } + } + } + impl PostGetValidityProofV2ResponseError { + pub fn code(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.code = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for code: {e}") + }); + self + } + pub fn message(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.message = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for message: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofV2ResponseError { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofV2ResponseError, + ) -> ::std::result::Result { + Ok(Self { + code: value.code?, + message: value.message?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofV2ResponseError { + fn from(value: super::PostGetValidityProofV2ResponseError) -> Self { + Self { + code: Ok(value.code), + message: Ok(value.message), + } + } + } + #[derive(Clone, Debug)] + pub struct PostGetValidityProofV2ResponseResult { + context: ::std::result::Result, + value: ::std::result::Result< + super::CompressedProofWithContextV2, + ::std::string::String, + >, + } + impl ::std::default::Default for PostGetValidityProofV2ResponseResult { + fn default() -> Self { + Self { + context: Err("no value supplied for context".to_string()), + value: Err("no value supplied for value".to_string()), + } + } + } + impl PostGetValidityProofV2ResponseResult { + pub fn context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for context: {e}") + }); + self + } + pub fn value(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.value = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for value: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::PostGetValidityProofV2ResponseResult { + type Error = super::error::ConversionError; + fn try_from( + value: PostGetValidityProofV2ResponseResult, + ) -> ::std::result::Result { + Ok(Self { + context: value.context?, + value: value.value?, + }) + } + } + impl ::std::convert::From + for PostGetValidityProofV2ResponseResult { + fn from(value: super::PostGetValidityProofV2ResponseResult) -> Self { + Self { + context: Ok(value.context), + value: Ok(value.value), + } + } + } + #[derive(Clone, Debug)] + pub struct QueueInfo { + queue: ::std::result::Result<::std::string::String, ::std::string::String>, + queue_size: ::std::result::Result, + queue_type: ::std::result::Result, + tree: ::std::result::Result<::std::string::String, ::std::string::String>, + } + impl ::std::default::Default for QueueInfo { + fn default() -> Self { + Self { + queue: Err("no value supplied for queue".to_string()), + queue_size: Err("no value supplied for queue_size".to_string()), + queue_type: Err("no value supplied for queue_type".to_string()), + tree: Err("no value supplied for tree".to_string()), + } + } + } + impl QueueInfo { + pub fn queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::string::String>, + T::Error: ::std::fmt::Display, + { + self.queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queue: {e}") + }); + self + } + pub fn queue_size(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.queue_size = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queue_size: {e}") + }); + self + } + pub fn queue_type(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.queue_type = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queue_type: {e}") + }); + self + } + pub fn tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::string::String>, + T::Error: ::std::fmt::Display, + { + self.tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::QueueInfo { + type Error = super::error::ConversionError; + fn try_from( + value: QueueInfo, + ) -> ::std::result::Result { + Ok(Self { + queue: value.queue?, + queue_size: value.queue_size?, + queue_type: value.queue_type?, + tree: value.tree?, + }) + } + } + impl ::std::convert::From for QueueInfo { + fn from(value: super::QueueInfo) -> Self { + Self { + queue: Ok(value.queue), + queue_size: Ok(value.queue_size), + queue_type: Ok(value.queue_type), + tree: Ok(value.tree), + } + } + } + #[derive(Clone, Debug)] + pub struct QueueRequest { + limit: ::std::result::Result, + start_index: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + zkp_batch_size: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for QueueRequest { + fn default() -> Self { + Self { + limit: Err("no value supplied for limit".to_string()), + start_index: Ok(Default::default()), + zkp_batch_size: Ok(Default::default()), + } + } + } + impl QueueRequest { + pub fn limit(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.limit = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for limit: {e}") + }); + self + } + pub fn start_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.start_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for start_index: {e}") + }); + self + } + pub fn zkp_batch_size(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.zkp_batch_size = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for zkp_batch_size: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom for super::QueueRequest { + type Error = super::error::ConversionError; + fn try_from( + value: QueueRequest, + ) -> ::std::result::Result { + Ok(Self { + limit: value.limit?, + start_index: value.start_index?, + zkp_batch_size: value.zkp_batch_size?, + }) + } + } + impl ::std::convert::From for QueueRequest { + fn from(value: super::QueueRequest) -> Self { + Self { + limit: Ok(value.limit), + start_index: Ok(value.start_index), + zkp_batch_size: Ok(value.zkp_batch_size), + } + } + } + #[derive(Clone, Debug)] + pub struct RootIndex { + prove_by_index: ::std::result::Result, + root_index: ::std::result::Result, + } + impl ::std::default::Default for RootIndex { + fn default() -> Self { + Self { + prove_by_index: Err( + "no value supplied for prove_by_index".to_string(), + ), + root_index: Err("no value supplied for root_index".to_string()), + } + } + } + impl RootIndex { + pub fn prove_by_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.prove_by_index = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for prove_by_index: {e}" + ) + }); + self + } + pub fn root_index(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root_index = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_index: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::RootIndex { + type Error = super::error::ConversionError; + fn try_from( + value: RootIndex, + ) -> ::std::result::Result { + Ok(Self { + prove_by_index: value.prove_by_index?, + root_index: value.root_index?, + }) + } + } + impl ::std::convert::From for RootIndex { + fn from(value: super::RootIndex) -> Self { + Self { + prove_by_index: Ok(value.prove_by_index), + root_index: Ok(value.root_index), + } + } + } + #[derive(Clone, Debug)] + pub struct SignatureInfo { + block_time: ::std::result::Result< + super::UnixTimestamp, + ::std::string::String, + >, + signature: ::std::result::Result< + super::SerializableSignature, + ::std::string::String, + >, + slot: ::std::result::Result, + } + impl ::std::default::Default for SignatureInfo { + fn default() -> Self { + Self { + block_time: Err("no value supplied for block_time".to_string()), + signature: Err("no value supplied for signature".to_string()), + slot: Err("no value supplied for slot".to_string()), + } + } + } + impl SignatureInfo { + pub fn block_time(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.block_time = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for block_time: {e}") + }); + self + } + pub fn signature(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.signature = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for signature: {e}") + }); + self + } + pub fn slot(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.slot = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for slot: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::SignatureInfo { + type Error = super::error::ConversionError; + fn try_from( + value: SignatureInfo, + ) -> ::std::result::Result { + Ok(Self { + block_time: value.block_time?, + signature: value.signature?, + slot: value.slot?, + }) + } + } + impl ::std::convert::From for SignatureInfo { + fn from(value: super::SignatureInfo) -> Self { + Self { + block_time: Ok(value.block_time), + signature: Ok(value.signature), + slot: Ok(value.slot), + } + } + } + #[derive(Clone, Debug)] + pub struct SignatureInfoList { + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for SignatureInfoList { + fn default() -> Self { + Self { + items: Err("no value supplied for items".to_string()), + } + } + } + impl SignatureInfoList { + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::SignatureInfoList { + type Error = super::error::ConversionError; + fn try_from( + value: SignatureInfoList, + ) -> ::std::result::Result { + Ok(Self { items: value.items? }) + } + } + impl ::std::convert::From for SignatureInfoList { + fn from(value: super::SignatureInfoList) -> Self { + Self { items: Ok(value.items) } + } + } + #[derive(Clone, Debug)] + pub struct SignatureInfoListWithError { + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for SignatureInfoListWithError { + fn default() -> Self { + Self { + items: Err("no value supplied for items".to_string()), + } + } + } + impl SignatureInfoListWithError { + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::vec::Vec, + >, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::SignatureInfoListWithError { + type Error = super::error::ConversionError; + fn try_from( + value: SignatureInfoListWithError, + ) -> ::std::result::Result { + Ok(Self { items: value.items? }) + } + } + impl ::std::convert::From + for SignatureInfoListWithError { + fn from(value: super::SignatureInfoListWithError) -> Self { + Self { items: Ok(value.items) } + } + } + #[derive(Clone, Debug)] + pub struct SignatureInfoWithError { + block_time: ::std::result::Result< + super::UnixTimestamp, + ::std::string::String, + >, + error: ::std::result::Result< + ::std::option::Option<::std::string::String>, + ::std::string::String, + >, + signature: ::std::result::Result< + super::SerializableSignature, + ::std::string::String, + >, + slot: ::std::result::Result, + } + impl ::std::default::Default for SignatureInfoWithError { + fn default() -> Self { + Self { + block_time: Err("no value supplied for block_time".to_string()), + error: Ok(Default::default()), + signature: Err("no value supplied for signature".to_string()), + slot: Err("no value supplied for slot".to_string()), + } + } + } + impl SignatureInfoWithError { + pub fn block_time(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.block_time = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for block_time: {e}") + }); + self + } + pub fn error(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>, + T::Error: ::std::fmt::Display, + { + self.error = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for error: {e}") + }); + self + } + pub fn signature(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.signature = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for signature: {e}") + }); + self + } + pub fn slot(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.slot = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for slot: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::SignatureInfoWithError { + type Error = super::error::ConversionError; + fn try_from( + value: SignatureInfoWithError, + ) -> ::std::result::Result { + Ok(Self { + block_time: value.block_time?, + error: value.error?, + signature: value.signature?, + slot: value.slot?, + }) + } + } + impl ::std::convert::From + for SignatureInfoWithError { + fn from(value: super::SignatureInfoWithError) -> Self { + Self { + block_time: Ok(value.block_time), + error: Ok(value.error), + signature: Ok(value.signature), + slot: Ok(value.slot), + } + } + } + #[derive(Clone, Debug)] + pub struct SolanaAccountData { + data: ::std::result::Result, + executable: ::std::result::Result, + lamports: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + rent_epoch: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + space: ::std::result::Result, + } + impl ::std::default::Default for SolanaAccountData { + fn default() -> Self { + Self { + data: Err("no value supplied for data".to_string()), + executable: Err("no value supplied for executable".to_string()), + lamports: Err("no value supplied for lamports".to_string()), + owner: Err("no value supplied for owner".to_string()), + rent_epoch: Err("no value supplied for rent_epoch".to_string()), + space: Err("no value supplied for space".to_string()), + } + } + } + impl SolanaAccountData { + pub fn data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.data = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for data: {e}") + }); + self + } + pub fn executable(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.executable = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for executable: {e}") + }); + self + } + pub fn lamports(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.lamports = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for lamports: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + pub fn rent_epoch(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.rent_epoch = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for rent_epoch: {e}") + }); + self + } + pub fn space(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.space = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for space: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::SolanaAccountData { + type Error = super::error::ConversionError; + fn try_from( + value: SolanaAccountData, + ) -> ::std::result::Result { + Ok(Self { + data: value.data?, + executable: value.executable?, + lamports: value.lamports?, + owner: value.owner?, + rent_epoch: value.rent_epoch?, + space: value.space?, + }) + } + } + impl ::std::convert::From for SolanaAccountData { + fn from(value: super::SolanaAccountData) -> Self { + Self { + data: Ok(value.data), + executable: Ok(value.executable), + lamports: Ok(value.lamports), + owner: Ok(value.owner), + rent_epoch: Ok(value.rent_epoch), + space: Ok(value.space), + } + } + } + #[derive(Clone, Debug)] + pub struct StateQueueData { + initial_root: ::std::result::Result, + input_queue: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + nodes: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + output_queue: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + root_seq: ::std::result::Result, + } + impl ::std::default::Default for StateQueueData { + fn default() -> Self { + Self { + initial_root: Err("no value supplied for initial_root".to_string()), + input_queue: Ok(Default::default()), + nodes: Ok(Default::default()), + output_queue: Ok(Default::default()), + root_seq: Err("no value supplied for root_seq".to_string()), + } + } + } + impl StateQueueData { + pub fn initial_root(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.initial_root = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for initial_root: {e}") + }); + self + } + pub fn input_queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.input_queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for input_queue: {e}") + }); + self + } + pub fn nodes(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.nodes = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for nodes: {e}") + }); + self + } + pub fn output_queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.output_queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for output_queue: {e}") + }); + self + } + pub fn root_seq(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.root_seq = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for root_seq: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::StateQueueData { + type Error = super::error::ConversionError; + fn try_from( + value: StateQueueData, + ) -> ::std::result::Result { + Ok(Self { + initial_root: value.initial_root?, + input_queue: value.input_queue?, + nodes: value.nodes?, + output_queue: value.output_queue?, + root_seq: value.root_seq?, + }) + } + } + impl ::std::convert::From for StateQueueData { + fn from(value: super::StateQueueData) -> Self { + Self { + initial_root: Ok(value.initial_root), + input_queue: Ok(value.input_queue), + nodes: Ok(value.nodes), + output_queue: Ok(value.output_queue), + root_seq: Ok(value.root_seq), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenAccount { + account: ::std::result::Result, + token_data: ::std::result::Result, + } + impl ::std::default::Default for TokenAccount { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + token_data: Err("no value supplied for token_data".to_string()), + } + } + } + impl TokenAccount { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn token_data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.token_data = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for token_data: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TokenAccount { + type Error = super::error::ConversionError; + fn try_from( + value: TokenAccount, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + token_data: value.token_data?, + }) + } + } + impl ::std::convert::From for TokenAccount { + fn from(value: super::TokenAccount) -> Self { + Self { + account: Ok(value.account), + token_data: Ok(value.token_data), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenAccountBalance { + amount: ::std::result::Result, + } + impl ::std::default::Default for TokenAccountBalance { + fn default() -> Self { + Self { + amount: Err("no value supplied for amount".to_string()), + } + } + } + impl TokenAccountBalance { + pub fn amount(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.amount = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for amount: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::TokenAccountBalance { + type Error = super::error::ConversionError; + fn try_from( + value: TokenAccountBalance, + ) -> ::std::result::Result { + Ok(Self { amount: value.amount? }) + } + } + impl ::std::convert::From for TokenAccountBalance { + fn from(value: super::TokenAccountBalance) -> Self { + Self { amount: Ok(value.amount) } + } + } + #[derive(Clone, Debug)] + pub struct TokenAccountInterface { + account: ::std::result::Result< + super::SolanaAccountData, + ::std::string::String, + >, + cold: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + key: ::std::result::Result, + token_data: ::std::result::Result, + } + impl ::std::default::Default for TokenAccountInterface { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + cold: Ok(Default::default()), + key: Err("no value supplied for key".to_string()), + token_data: Err("no value supplied for token_data".to_string()), + } + } + } + impl TokenAccountInterface { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn cold(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cold = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cold: {e}") + }); + self + } + pub fn key(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.key = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for key: {e}") + }); + self + } + pub fn token_data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.token_data = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for token_data: {e}") + }); + self + } + } + impl ::std::convert::TryFrom + for super::TokenAccountInterface { + type Error = super::error::ConversionError; + fn try_from( + value: TokenAccountInterface, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + cold: value.cold?, + key: value.key?, + token_data: value.token_data?, + }) + } + } + impl ::std::convert::From + for TokenAccountInterface { + fn from(value: super::TokenAccountInterface) -> Self { + Self { + account: Ok(value.account), + cold: Ok(value.cold), + key: Ok(value.key), + token_data: Ok(value.token_data), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenAccountList { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for TokenAccountList { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + items: Err("no value supplied for items".to_string()), + } + } + } + impl TokenAccountList { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TokenAccountList { + type Error = super::error::ConversionError; + fn try_from( + value: TokenAccountList, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + items: value.items?, + }) + } + } + impl ::std::convert::From for TokenAccountList { + fn from(value: super::TokenAccountList) -> Self { + Self { + cursor: Ok(value.cursor), + items: Ok(value.items), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenAccountListV2 { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for TokenAccountListV2 { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + items: Err("no value supplied for items".to_string()), + } + } + } + impl TokenAccountListV2 { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TokenAccountListV2 { + type Error = super::error::ConversionError; + fn try_from( + value: TokenAccountListV2, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + items: value.items?, + }) + } + } + impl ::std::convert::From for TokenAccountListV2 { + fn from(value: super::TokenAccountListV2) -> Self { + Self { + cursor: Ok(value.cursor), + items: Ok(value.items), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenAccountV2 { + account: ::std::result::Result, + token_data: ::std::result::Result, + } + impl ::std::default::Default for TokenAccountV2 { + fn default() -> Self { + Self { + account: Err("no value supplied for account".to_string()), + token_data: Err("no value supplied for token_data".to_string()), + } + } + } + impl TokenAccountV2 { + pub fn account(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.account = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for account: {e}") + }); + self + } + pub fn token_data(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.token_data = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for token_data: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TokenAccountV2 { + type Error = super::error::ConversionError; + fn try_from( + value: TokenAccountV2, + ) -> ::std::result::Result { + Ok(Self { + account: value.account?, + token_data: value.token_data?, + }) + } + } + impl ::std::convert::From for TokenAccountV2 { + fn from(value: super::TokenAccountV2) -> Self { + Self { + account: Ok(value.account), + token_data: Ok(value.token_data), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenBalance { + balance: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + mint: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + } + impl ::std::default::Default for TokenBalance { + fn default() -> Self { + Self { + balance: Err("no value supplied for balance".to_string()), + mint: Err("no value supplied for mint".to_string()), + } + } + } + impl TokenBalance { + pub fn balance(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.balance = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for balance: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TokenBalance { + type Error = super::error::ConversionError; + fn try_from( + value: TokenBalance, + ) -> ::std::result::Result { + Ok(Self { + balance: value.balance?, + mint: value.mint?, + }) + } + } + impl ::std::convert::From for TokenBalance { + fn from(value: super::TokenBalance) -> Self { + Self { + balance: Ok(value.balance), + mint: Ok(value.mint), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenBalanceList { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + token_balances: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for TokenBalanceList { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + token_balances: Err( + "no value supplied for token_balances".to_string(), + ), + } + } + } + impl TokenBalanceList { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn token_balances(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.token_balances = value + .try_into() + .map_err(|e| { + format!( + "error converting supplied value for token_balances: {e}" + ) + }); + self + } + } + impl ::std::convert::TryFrom for super::TokenBalanceList { + type Error = super::error::ConversionError; + fn try_from( + value: TokenBalanceList, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + token_balances: value.token_balances?, + }) + } + } + impl ::std::convert::From for TokenBalanceList { + fn from(value: super::TokenBalanceList) -> Self { + Self { + cursor: Ok(value.cursor), + token_balances: Ok(value.token_balances), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenBalanceListV2 { + cursor: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + items: ::std::result::Result< + ::std::vec::Vec, + ::std::string::String, + >, + } + impl ::std::default::Default for TokenBalanceListV2 { + fn default() -> Self { + Self { + cursor: Ok(Default::default()), + items: Err("no value supplied for items".to_string()), + } + } + } + impl TokenBalanceListV2 { + pub fn cursor(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.cursor = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cursor: {e}") + }); + self + } + pub fn items(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::vec::Vec>, + T::Error: ::std::fmt::Display, + { + self.items = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for items: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TokenBalanceListV2 { + type Error = super::error::ConversionError; + fn try_from( + value: TokenBalanceListV2, + ) -> ::std::result::Result { + Ok(Self { + cursor: value.cursor?, + items: value.items?, + }) + } + } + impl ::std::convert::From for TokenBalanceListV2 { + fn from(value: super::TokenBalanceListV2) -> Self { + Self { + cursor: Ok(value.cursor), + items: Ok(value.items), + } + } + } + #[derive(Clone, Debug)] + pub struct TokenData { + amount: ::std::result::Result, + delegate: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + mint: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + owner: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + state: ::std::result::Result, + tlv: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + } + impl ::std::default::Default for TokenData { + fn default() -> Self { + Self { + amount: Err("no value supplied for amount".to_string()), + delegate: Ok(Default::default()), + mint: Err("no value supplied for mint".to_string()), + owner: Err("no value supplied for owner".to_string()), + state: Err("no value supplied for state".to_string()), + tlv: Ok(Default::default()), + } + } + } + impl TokenData { + pub fn amount(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.amount = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for amount: {e}") + }); + self + } + pub fn delegate(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.delegate = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for delegate: {e}") + }); + self + } + pub fn mint(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.mint = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for mint: {e}") + }); + self + } + pub fn owner(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.owner = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for owner: {e}") + }); + self + } + pub fn state(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.state = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for state: {e}") + }); + self + } + pub fn tlv(mut self, value: T) -> Self + where + T: ::std::convert::TryInto<::std::option::Option>, + T::Error: ::std::fmt::Display, + { + self.tlv = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tlv: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TokenData { + type Error = super::error::ConversionError; + fn try_from( + value: TokenData, + ) -> ::std::result::Result { + Ok(Self { + amount: value.amount?, + delegate: value.delegate?, + mint: value.mint?, + owner: value.owner?, + state: value.state?, + tlv: value.tlv?, + }) + } + } + impl ::std::convert::From for TokenData { + fn from(value: super::TokenData) -> Self { + Self { + amount: Ok(value.amount), + delegate: Ok(value.delegate), + mint: Ok(value.mint), + owner: Ok(value.owner), + state: Ok(value.state), + tlv: Ok(value.tlv), + } + } + } + #[derive(Clone, Debug)] + pub struct TreeContextInfo { + cpi_context: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + queue: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + tree: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + tree_type: ::std::result::Result, + } + impl ::std::default::Default for TreeContextInfo { + fn default() -> Self { + Self { + cpi_context: Ok(Default::default()), + queue: Err("no value supplied for queue".to_string()), + tree: Err("no value supplied for tree".to_string()), + tree_type: Err("no value supplied for tree_type".to_string()), + } + } + } + impl TreeContextInfo { + pub fn cpi_context(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.cpi_context = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for cpi_context: {e}") + }); + self + } + pub fn queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queue: {e}") + }); + self + } + pub fn tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree: {e}") + }); + self + } + pub fn tree_type(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree_type = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree_type: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TreeContextInfo { + type Error = super::error::ConversionError; + fn try_from( + value: TreeContextInfo, + ) -> ::std::result::Result { + Ok(Self { + cpi_context: value.cpi_context?, + queue: value.queue?, + tree: value.tree?, + tree_type: value.tree_type?, + }) + } + } + impl ::std::convert::From for TreeContextInfo { + fn from(value: super::TreeContextInfo) -> Self { + Self { + cpi_context: Ok(value.cpi_context), + queue: Ok(value.queue), + tree: Ok(value.tree), + tree_type: Ok(value.tree_type), + } + } + } + #[derive(Clone, Debug)] + pub struct TreeInfo { + queue: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + seq: ::std::result::Result< + ::std::option::Option, + ::std::string::String, + >, + slot_created: ::std::result::Result< + super::UnsignedInteger, + ::std::string::String, + >, + tree: ::std::result::Result< + super::SerializablePubkey, + ::std::string::String, + >, + tree_type: ::std::result::Result, + } + impl ::std::default::Default for TreeInfo { + fn default() -> Self { + Self { + queue: Err("no value supplied for queue".to_string()), + seq: Ok(Default::default()), + slot_created: Err("no value supplied for slot_created".to_string()), + tree: Err("no value supplied for tree".to_string()), + tree_type: Err("no value supplied for tree_type".to_string()), + } + } + } + impl TreeInfo { + pub fn queue(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.queue = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for queue: {e}") + }); + self + } + pub fn seq(mut self, value: T) -> Self + where + T: ::std::convert::TryInto< + ::std::option::Option, + >, + T::Error: ::std::fmt::Display, + { + self.seq = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for seq: {e}") + }); + self + } + pub fn slot_created(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.slot_created = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for slot_created: {e}") + }); + self + } + pub fn tree(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree: {e}") + }); + self + } + pub fn tree_type(mut self, value: T) -> Self + where + T: ::std::convert::TryInto, + T::Error: ::std::fmt::Display, + { + self.tree_type = value + .try_into() + .map_err(|e| { + format!("error converting supplied value for tree_type: {e}") + }); + self + } + } + impl ::std::convert::TryFrom for super::TreeInfo { + type Error = super::error::ConversionError; + fn try_from( + value: TreeInfo, + ) -> ::std::result::Result { + Ok(Self { + queue: value.queue?, + seq: value.seq?, + slot_created: value.slot_created?, + tree: value.tree?, + tree_type: value.tree_type?, + }) + } + } + impl ::std::convert::From for TreeInfo { + fn from(value: super::TreeInfo) -> Self { + Self { + queue: Ok(value.queue), + seq: Ok(value.seq), + slot_created: Ok(value.slot_created), + tree: Ok(value.tree), + tree_type: Ok(value.tree_type), + } + } + } + } + /// Generation of default values for serde. + pub mod defaults { + pub(super) fn default_u64() -> T + where + T: ::std::convert::TryFrom, + >::Error: ::std::fmt::Debug, + { + T::try_from(V).unwrap() + } + pub(super) fn post_get_indexer_health_response_result() -> super::PostGetIndexerHealthResponseResult { + super::PostGetIndexerHealthResponseResult::Ok + } + } +} +#[derive(Clone, Debug)] +/**Client for photon-indexer + +Solana indexer for general compression + +Version: 0.51.2*/ +pub struct Client { + pub(crate) baseurl: String, + pub(crate) client: reqwest::Client, +} +impl Client { + /// Create a new client. + /// + /// `baseurl` is the base URL provided to the internal + /// `reqwest::Client`, and should include a scheme and hostname, + /// as well as port and a path stem if applicable. + pub fn new(baseurl: &str) -> Self { + #[cfg(not(target_arch = "wasm32"))] + let client = { + let dur = ::std::time::Duration::from_secs(15u64); + reqwest::ClientBuilder::new().connect_timeout(dur).timeout(dur) + }; + #[cfg(target_arch = "wasm32")] + let client = reqwest::ClientBuilder::new(); + Self::new_with_client(baseurl, client.build().unwrap()) + } + /// Construct a new client with an existing `reqwest::Client`, + /// allowing more control over its configuration. + /// + /// `baseurl` is the base URL provided to the internal + /// `reqwest::Client`, and should include a scheme and hostname, + /// as well as port and a path stem if applicable. + pub fn new_with_client(baseurl: &str, client: reqwest::Client) -> Self { + Self { + baseurl: baseurl.to_string(), + client, + } + } +} +impl ClientInfo<()> for Client { + fn api_version() -> &'static str { + "0.51.2" + } + fn baseurl(&self) -> &str { + self.baseurl.as_str() + } + fn client(&self) -> &reqwest::Client { + &self.client + } + fn inner(&self) -> &() { + &() + } +} +impl ClientHooks<()> for &Client {} +impl Client { + /**Sends a `POST` request to `/getAccountInterface` + +```ignore +let response = client.post_get_account_interface() + .body(body) + .send() + .await; +```*/ + pub fn post_get_account_interface(&self) -> builder::PostGetAccountInterface<'_> { + builder::PostGetAccountInterface::new(self) + } + /**Sends a `POST` request to `/getAccountInterfaces` + +```ignore +let response = client.post_get_account_interfaces() + .body(body) + .send() + .await; +```*/ + pub fn post_get_account_interfaces(&self) -> builder::PostGetAccountInterfaces<'_> { + builder::PostGetAccountInterfaces::new(self) + } + /**Sends a `POST` request to `/getAtaInterface` + +```ignore +let response = client.post_get_ata_interface() + .body(body) + .send() + .await; +```*/ + pub fn post_get_ata_interface(&self) -> builder::PostGetAtaInterface<'_> { + builder::PostGetAtaInterface::new(self) + } + /**Sends a `POST` request to `/getCompressedAccount` + +```ignore +let response = client.post_get_compressed_account() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_account(&self) -> builder::PostGetCompressedAccount<'_> { + builder::PostGetCompressedAccount::new(self) + } + /**Sends a `POST` request to `/getCompressedAccountBalance` + +```ignore +let response = client.post_get_compressed_account_balance() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_account_balance( + &self, + ) -> builder::PostGetCompressedAccountBalance<'_> { + builder::PostGetCompressedAccountBalance::new(self) + } + /**Sends a `POST` request to `/getCompressedAccountProof` + +```ignore +let response = client.post_get_compressed_account_proof() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_account_proof( + &self, + ) -> builder::PostGetCompressedAccountProof<'_> { + builder::PostGetCompressedAccountProof::new(self) + } + /**Sends a `POST` request to `/getCompressedAccountProofV2` + +```ignore +let response = client.post_get_compressed_account_proof_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_account_proof_v2( + &self, + ) -> builder::PostGetCompressedAccountProofV2<'_> { + builder::PostGetCompressedAccountProofV2::new(self) + } + /**Sends a `POST` request to `/getCompressedAccountV2` + +```ignore +let response = client.post_get_compressed_account_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_account_v2( + &self, + ) -> builder::PostGetCompressedAccountV2<'_> { + builder::PostGetCompressedAccountV2::new(self) + } + /**Sends a `POST` request to `/getCompressedAccountsByOwner` + +```ignore +let response = client.post_get_compressed_accounts_by_owner() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_accounts_by_owner( + &self, + ) -> builder::PostGetCompressedAccountsByOwner<'_> { + builder::PostGetCompressedAccountsByOwner::new(self) + } + /**Sends a `POST` request to `/getCompressedAccountsByOwnerV2` + +```ignore +let response = client.post_get_compressed_accounts_by_owner_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_accounts_by_owner_v2( + &self, + ) -> builder::PostGetCompressedAccountsByOwnerV2<'_> { + builder::PostGetCompressedAccountsByOwnerV2::new(self) + } + /**Sends a `POST` request to `/getCompressedBalanceByOwner` + +```ignore +let response = client.post_get_compressed_balance_by_owner() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_balance_by_owner( + &self, + ) -> builder::PostGetCompressedBalanceByOwner<'_> { + builder::PostGetCompressedBalanceByOwner::new(self) + } + /**Sends a `POST` request to `/getCompressedMintTokenHolders` + +```ignore +let response = client.post_get_compressed_mint_token_holders() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_mint_token_holders( + &self, + ) -> builder::PostGetCompressedMintTokenHolders<'_> { + builder::PostGetCompressedMintTokenHolders::new(self) + } + /**Sends a `POST` request to `/getCompressedTokenAccountBalance` + +```ignore +let response = client.post_get_compressed_token_account_balance() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_token_account_balance( + &self, + ) -> builder::PostGetCompressedTokenAccountBalance<'_> { + builder::PostGetCompressedTokenAccountBalance::new(self) + } + /**Sends a `POST` request to `/getCompressedTokenAccountsByDelegate` + +```ignore +let response = client.post_get_compressed_token_accounts_by_delegate() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_token_accounts_by_delegate( + &self, + ) -> builder::PostGetCompressedTokenAccountsByDelegate<'_> { + builder::PostGetCompressedTokenAccountsByDelegate::new(self) + } + /**Sends a `POST` request to `/getCompressedTokenAccountsByDelegateV2` + +```ignore +let response = client.post_get_compressed_token_accounts_by_delegate_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_token_accounts_by_delegate_v2( + &self, + ) -> builder::PostGetCompressedTokenAccountsByDelegateV2<'_> { + builder::PostGetCompressedTokenAccountsByDelegateV2::new(self) + } + /**Sends a `POST` request to `/getCompressedTokenAccountsByOwner` + +```ignore +let response = client.post_get_compressed_token_accounts_by_owner() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_token_accounts_by_owner( + &self, + ) -> builder::PostGetCompressedTokenAccountsByOwner<'_> { + builder::PostGetCompressedTokenAccountsByOwner::new(self) + } + /**Sends a `POST` request to `/getCompressedTokenAccountsByOwnerV2` + +```ignore +let response = client.post_get_compressed_token_accounts_by_owner_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_token_accounts_by_owner_v2( + &self, + ) -> builder::PostGetCompressedTokenAccountsByOwnerV2<'_> { + builder::PostGetCompressedTokenAccountsByOwnerV2::new(self) + } + /**Sends a `POST` request to `/getCompressedTokenBalancesByOwner` + +```ignore +let response = client.post_get_compressed_token_balances_by_owner() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_token_balances_by_owner( + &self, + ) -> builder::PostGetCompressedTokenBalancesByOwner<'_> { + builder::PostGetCompressedTokenBalancesByOwner::new(self) + } + /**Sends a `POST` request to `/getCompressedTokenBalancesByOwnerV2` + +```ignore +let response = client.post_get_compressed_token_balances_by_owner_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compressed_token_balances_by_owner_v2( + &self, + ) -> builder::PostGetCompressedTokenBalancesByOwnerV2<'_> { + builder::PostGetCompressedTokenBalancesByOwnerV2::new(self) + } + /**Sends a `POST` request to `/getCompressionSignaturesForAccount` + +```ignore +let response = client.post_get_compression_signatures_for_account() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compression_signatures_for_account( + &self, + ) -> builder::PostGetCompressionSignaturesForAccount<'_> { + builder::PostGetCompressionSignaturesForAccount::new(self) + } + /**Sends a `POST` request to `/getCompressionSignaturesForAddress` + +```ignore +let response = client.post_get_compression_signatures_for_address() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compression_signatures_for_address( + &self, + ) -> builder::PostGetCompressionSignaturesForAddress<'_> { + builder::PostGetCompressionSignaturesForAddress::new(self) + } + /**Sends a `POST` request to `/getCompressionSignaturesForOwner` + +```ignore +let response = client.post_get_compression_signatures_for_owner() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compression_signatures_for_owner( + &self, + ) -> builder::PostGetCompressionSignaturesForOwner<'_> { + builder::PostGetCompressionSignaturesForOwner::new(self) + } + /**Sends a `POST` request to `/getCompressionSignaturesForTokenOwner` + +```ignore +let response = client.post_get_compression_signatures_for_token_owner() + .body(body) + .send() + .await; +```*/ + pub fn post_get_compression_signatures_for_token_owner( + &self, + ) -> builder::PostGetCompressionSignaturesForTokenOwner<'_> { + builder::PostGetCompressionSignaturesForTokenOwner::new(self) + } + /**Sends a `POST` request to `/getIndexerHealth` + +```ignore +let response = client.post_get_indexer_health() + .body(body) + .send() + .await; +```*/ + pub fn post_get_indexer_health(&self) -> builder::PostGetIndexerHealth<'_> { + builder::PostGetIndexerHealth::new(self) + } + /**Sends a `POST` request to `/getIndexerSlot` + +```ignore +let response = client.post_get_indexer_slot() + .body(body) + .send() + .await; +```*/ + pub fn post_get_indexer_slot(&self) -> builder::PostGetIndexerSlot<'_> { + builder::PostGetIndexerSlot::new(self) + } + /**Sends a `POST` request to `/getLatestCompressionSignatures` + +```ignore +let response = client.post_get_latest_compression_signatures() + .body(body) + .send() + .await; +```*/ + pub fn post_get_latest_compression_signatures( + &self, + ) -> builder::PostGetLatestCompressionSignatures<'_> { + builder::PostGetLatestCompressionSignatures::new(self) + } + /**Sends a `POST` request to `/getLatestNonVotingSignatures` + +```ignore +let response = client.post_get_latest_non_voting_signatures() + .body(body) + .send() + .await; +```*/ + pub fn post_get_latest_non_voting_signatures( + &self, + ) -> builder::PostGetLatestNonVotingSignatures<'_> { + builder::PostGetLatestNonVotingSignatures::new(self) + } + /**Sends a `POST` request to `/getMultipleAccountInterfaces` + +```ignore +let response = client.post_get_multiple_account_interfaces() + .body(body) + .send() + .await; +```*/ + pub fn post_get_multiple_account_interfaces( + &self, + ) -> builder::PostGetMultipleAccountInterfaces<'_> { + builder::PostGetMultipleAccountInterfaces::new(self) + } + /**Sends a `POST` request to `/getMultipleCompressedAccountProofs` + +```ignore +let response = client.post_get_multiple_compressed_account_proofs() + .body(body) + .send() + .await; +```*/ + pub fn post_get_multiple_compressed_account_proofs( + &self, + ) -> builder::PostGetMultipleCompressedAccountProofs<'_> { + builder::PostGetMultipleCompressedAccountProofs::new(self) + } + /**Sends a `POST` request to `/getMultipleCompressedAccountProofsV2` + +```ignore +let response = client.post_get_multiple_compressed_account_proofs_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_multiple_compressed_account_proofs_v2( + &self, + ) -> builder::PostGetMultipleCompressedAccountProofsV2<'_> { + builder::PostGetMultipleCompressedAccountProofsV2::new(self) + } + /**Sends a `POST` request to `/getMultipleCompressedAccounts` + +```ignore +let response = client.post_get_multiple_compressed_accounts() + .body(body) + .send() + .await; +```*/ + pub fn post_get_multiple_compressed_accounts( + &self, + ) -> builder::PostGetMultipleCompressedAccounts<'_> { + builder::PostGetMultipleCompressedAccounts::new(self) + } + /**Sends a `POST` request to `/getMultipleCompressedAccountsV2` + +```ignore +let response = client.post_get_multiple_compressed_accounts_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_multiple_compressed_accounts_v2( + &self, + ) -> builder::PostGetMultipleCompressedAccountsV2<'_> { + builder::PostGetMultipleCompressedAccountsV2::new(self) + } + /**Sends a `POST` request to `/getMultipleNewAddressProofs` + +```ignore +let response = client.post_get_multiple_new_address_proofs() + .body(body) + .send() + .await; +```*/ + pub fn post_get_multiple_new_address_proofs( + &self, + ) -> builder::PostGetMultipleNewAddressProofs<'_> { + builder::PostGetMultipleNewAddressProofs::new(self) + } + /**Sends a `POST` request to `/getMultipleNewAddressProofsV2` + +```ignore +let response = client.post_get_multiple_new_address_proofs_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_multiple_new_address_proofs_v2( + &self, + ) -> builder::PostGetMultipleNewAddressProofsV2<'_> { + builder::PostGetMultipleNewAddressProofsV2::new(self) + } + /**Sends a `POST` request to `/getQueueElements` + +```ignore +let response = client.post_get_queue_elements() + .body(body) + .send() + .await; +```*/ + pub fn post_get_queue_elements(&self) -> builder::PostGetQueueElements<'_> { + builder::PostGetQueueElements::new(self) + } + /**Sends a `POST` request to `/getQueueInfo` + +```ignore +let response = client.post_get_queue_info() + .body(body) + .send() + .await; +```*/ + pub fn post_get_queue_info(&self) -> builder::PostGetQueueInfo<'_> { + builder::PostGetQueueInfo::new(self) + } + /**Sends a `POST` request to `/getTokenAccountInterface` + +```ignore +let response = client.post_get_token_account_interface() + .body(body) + .send() + .await; +```*/ + pub fn post_get_token_account_interface( + &self, + ) -> builder::PostGetTokenAccountInterface<'_> { + builder::PostGetTokenAccountInterface::new(self) + } + /**Sends a `POST` request to `/getTokenAccountInterfaces` + +```ignore +let response = client.post_get_token_account_interfaces() + .body(body) + .send() + .await; +```*/ + pub fn post_get_token_account_interfaces( + &self, + ) -> builder::PostGetTokenAccountInterfaces<'_> { + builder::PostGetTokenAccountInterfaces::new(self) + } + /**Sends a `POST` request to `/getTransactionWithCompressionInfo` + +```ignore +let response = client.post_get_transaction_with_compression_info() + .body(body) + .send() + .await; +```*/ + pub fn post_get_transaction_with_compression_info( + &self, + ) -> builder::PostGetTransactionWithCompressionInfo<'_> { + builder::PostGetTransactionWithCompressionInfo::new(self) + } + /**Sends a `POST` request to `/getTransactionWithCompressionInfoV2` + +```ignore +let response = client.post_get_transaction_with_compression_info_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_transaction_with_compression_info_v2( + &self, + ) -> builder::PostGetTransactionWithCompressionInfoV2<'_> { + builder::PostGetTransactionWithCompressionInfoV2::new(self) + } + /**Sends a `POST` request to `/getValidityProof` + +```ignore +let response = client.post_get_validity_proof() + .body(body) + .send() + .await; +```*/ + pub fn post_get_validity_proof(&self) -> builder::PostGetValidityProof<'_> { + builder::PostGetValidityProof::new(self) + } + /**Sends a `POST` request to `/getValidityProofV2` + +```ignore +let response = client.post_get_validity_proof_v2() + .body(body) + .send() + .await; +```*/ + pub fn post_get_validity_proof_v2(&self) -> builder::PostGetValidityProofV2<'_> { + builder::PostGetValidityProofV2::new(self) + } +} +/// Types for composing operation parameters. +#[allow(clippy::all)] +pub mod builder { + use super::types; + #[allow(unused_imports)] + use super::{ + encode_path, ByteStream, ClientInfo, ClientHooks, Error, OperationInfo, + RequestBuilderExt, ResponseValue, + }; + /**Builder for [`Client::post_get_account_interface`] + +[`Client::post_get_account_interface`]: super::Client::post_get_account_interface*/ + #[derive(Debug, Clone)] + pub struct PostGetAccountInterface<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetAccountInterface<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetAccountInterfaceBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetAccountInterfaceBody, + ) -> types::builder::PostGetAccountInterfaceBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getAccountInterface` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetAccountInterfaceBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getAccountInterface", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_account_interface", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_account_interfaces`] + +[`Client::post_get_account_interfaces`]: super::Client::post_get_account_interfaces*/ + #[derive(Debug, Clone)] + pub struct PostGetAccountInterfaces<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetAccountInterfaces<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetAccountInterfacesBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetAccountInterfacesBody, + ) -> types::builder::PostGetAccountInterfacesBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getAccountInterfaces` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetAccountInterfacesBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getAccountInterfaces", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_account_interfaces", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_ata_interface`] + +[`Client::post_get_ata_interface`]: super::Client::post_get_ata_interface*/ + #[derive(Debug, Clone)] + pub struct PostGetAtaInterface<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetAtaInterface<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetAtaInterfaceBody` for body failed: {}", s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetAtaInterfaceBody, + ) -> types::builder::PostGetAtaInterfaceBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getAtaInterface` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetAtaInterfaceBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getAtaInterface", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_ata_interface", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_account`] + +[`Client::post_get_compressed_account`]: super::Client::post_get_compressed_account*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedAccount<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedAccount<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedAccountBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedAccountBody, + ) -> types::builder::PostGetCompressedAccountBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedAccount` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedAccountBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedAccount", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_account", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_account_balance`] + +[`Client::post_get_compressed_account_balance`]: super::Client::post_get_compressed_account_balance*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedAccountBalance<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedAccountBalance<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedAccountBalanceBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedAccountBalanceBody, + ) -> types::builder::PostGetCompressedAccountBalanceBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedAccountBalance` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedAccountBalanceBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedAccountBalance", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_account_balance", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_account_proof`] + +[`Client::post_get_compressed_account_proof`]: super::Client::post_get_compressed_account_proof*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedAccountProof<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedAccountProof<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedAccountProofBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedAccountProofBody, + ) -> types::builder::PostGetCompressedAccountProofBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedAccountProof` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedAccountProofBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedAccountProof", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_account_proof", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_account_proof_v2`] + +[`Client::post_get_compressed_account_proof_v2`]: super::Client::post_get_compressed_account_proof_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedAccountProofV2<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedAccountProofV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedAccountProofV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedAccountProofV2Body, + ) -> types::builder::PostGetCompressedAccountProofV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedAccountProofV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedAccountProofV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedAccountProofV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_account_proof_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_account_v2`] + +[`Client::post_get_compressed_account_v2`]: super::Client::post_get_compressed_account_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedAccountV2<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedAccountV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedAccountV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedAccountV2Body, + ) -> types::builder::PostGetCompressedAccountV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedAccountV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedAccountV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedAccountV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_account_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_accounts_by_owner`] + +[`Client::post_get_compressed_accounts_by_owner`]: super::Client::post_get_compressed_accounts_by_owner*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedAccountsByOwner<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedAccountsByOwner<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedAccountsByOwnerBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedAccountsByOwnerBody, + ) -> types::builder::PostGetCompressedAccountsByOwnerBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedAccountsByOwner` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedAccountsByOwnerBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedAccountsByOwner", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_accounts_by_owner", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_accounts_by_owner_v2`] + +[`Client::post_get_compressed_accounts_by_owner_v2`]: super::Client::post_get_compressed_accounts_by_owner_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedAccountsByOwnerV2<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedAccountsByOwnerV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedAccountsByOwnerV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedAccountsByOwnerV2Body, + ) -> types::builder::PostGetCompressedAccountsByOwnerV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedAccountsByOwnerV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedAccountsByOwnerV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedAccountsByOwnerV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_accounts_by_owner_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_balance_by_owner`] + +[`Client::post_get_compressed_balance_by_owner`]: super::Client::post_get_compressed_balance_by_owner*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedBalanceByOwner<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedBalanceByOwner<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedBalanceByOwnerBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedBalanceByOwnerBody, + ) -> types::builder::PostGetCompressedBalanceByOwnerBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedBalanceByOwner` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedBalanceByOwnerBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedBalanceByOwner", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_balance_by_owner", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_mint_token_holders`] + +[`Client::post_get_compressed_mint_token_holders`]: super::Client::post_get_compressed_mint_token_holders*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedMintTokenHolders<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedMintTokenHolders<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedMintTokenHoldersBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedMintTokenHoldersBody, + ) -> types::builder::PostGetCompressedMintTokenHoldersBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedMintTokenHolders` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedMintTokenHoldersBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedMintTokenHolders", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_mint_token_holders", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_token_account_balance`] + +[`Client::post_get_compressed_token_account_balance`]: super::Client::post_get_compressed_token_account_balance*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedTokenAccountBalance<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedTokenAccountBalance<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedTokenAccountBalanceBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedTokenAccountBalanceBody, + ) -> types::builder::PostGetCompressedTokenAccountBalanceBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedTokenAccountBalance` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedTokenAccountBalanceBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedTokenAccountBalance", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_token_account_balance", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_token_accounts_by_delegate`] + +[`Client::post_get_compressed_token_accounts_by_delegate`]: super::Client::post_get_compressed_token_accounts_by_delegate*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedTokenAccountsByDelegate<'a> { + client: &'a super::Client, + body: Result< + types::builder::PostGetCompressedTokenAccountsByDelegateBody, + String, + >, + } + impl<'a> PostGetCompressedTokenAccountsByDelegate<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto< + types::PostGetCompressedTokenAccountsByDelegateBody, + >, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedTokenAccountsByDelegateBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedTokenAccountsByDelegateBody, + ) -> types::builder::PostGetCompressedTokenAccountsByDelegateBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedTokenAccountsByDelegate` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedTokenAccountsByDelegateBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!( + "{}/getCompressedTokenAccountsByDelegate", client.baseurl, + ); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_token_accounts_by_delegate", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_token_accounts_by_delegate_v2`] + +[`Client::post_get_compressed_token_accounts_by_delegate_v2`]: super::Client::post_get_compressed_token_accounts_by_delegate_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedTokenAccountsByDelegateV2<'a> { + client: &'a super::Client, + body: Result< + types::builder::PostGetCompressedTokenAccountsByDelegateV2Body, + String, + >, + } + impl<'a> PostGetCompressedTokenAccountsByDelegateV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto< + types::PostGetCompressedTokenAccountsByDelegateV2Body, + >, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedTokenAccountsByDelegateV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedTokenAccountsByDelegateV2Body, + ) -> types::builder::PostGetCompressedTokenAccountsByDelegateV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedTokenAccountsByDelegateV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedTokenAccountsByDelegateV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!( + "{}/getCompressedTokenAccountsByDelegateV2", client.baseurl, + ); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_token_accounts_by_delegate_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_token_accounts_by_owner`] + +[`Client::post_get_compressed_token_accounts_by_owner`]: super::Client::post_get_compressed_token_accounts_by_owner*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedTokenAccountsByOwner<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedTokenAccountsByOwner<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedTokenAccountsByOwnerBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedTokenAccountsByOwnerBody, + ) -> types::builder::PostGetCompressedTokenAccountsByOwnerBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedTokenAccountsByOwner` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedTokenAccountsByOwnerBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedTokenAccountsByOwner", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_token_accounts_by_owner", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_token_accounts_by_owner_v2`] + +[`Client::post_get_compressed_token_accounts_by_owner_v2`]: super::Client::post_get_compressed_token_accounts_by_owner_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedTokenAccountsByOwnerV2<'a> { + client: &'a super::Client, + body: Result< + types::builder::PostGetCompressedTokenAccountsByOwnerV2Body, + String, + >, + } + impl<'a> PostGetCompressedTokenAccountsByOwnerV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedTokenAccountsByOwnerV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedTokenAccountsByOwnerV2Body, + ) -> types::builder::PostGetCompressedTokenAccountsByOwnerV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedTokenAccountsByOwnerV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedTokenAccountsByOwnerV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedTokenAccountsByOwnerV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_token_accounts_by_owner_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_token_balances_by_owner`] + +[`Client::post_get_compressed_token_balances_by_owner`]: super::Client::post_get_compressed_token_balances_by_owner*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedTokenBalancesByOwner<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressedTokenBalancesByOwner<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedTokenBalancesByOwnerBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedTokenBalancesByOwnerBody, + ) -> types::builder::PostGetCompressedTokenBalancesByOwnerBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedTokenBalancesByOwner` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedTokenBalancesByOwnerBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedTokenBalancesByOwner", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_token_balances_by_owner", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compressed_token_balances_by_owner_v2`] + +[`Client::post_get_compressed_token_balances_by_owner_v2`]: super::Client::post_get_compressed_token_balances_by_owner_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressedTokenBalancesByOwnerV2<'a> { + client: &'a super::Client, + body: Result< + types::builder::PostGetCompressedTokenBalancesByOwnerV2Body, + String, + >, + } + impl<'a> PostGetCompressedTokenBalancesByOwnerV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressedTokenBalancesByOwnerV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressedTokenBalancesByOwnerV2Body, + ) -> types::builder::PostGetCompressedTokenBalancesByOwnerV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressedTokenBalancesByOwnerV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressedTokenBalancesByOwnerV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressedTokenBalancesByOwnerV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compressed_token_balances_by_owner_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compression_signatures_for_account`] + +[`Client::post_get_compression_signatures_for_account`]: super::Client::post_get_compression_signatures_for_account*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressionSignaturesForAccount<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressionSignaturesForAccount<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressionSignaturesForAccountBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressionSignaturesForAccountBody, + ) -> types::builder::PostGetCompressionSignaturesForAccountBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressionSignaturesForAccount` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressionSignaturesForAccountBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressionSignaturesForAccount", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compression_signatures_for_account", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compression_signatures_for_address`] + +[`Client::post_get_compression_signatures_for_address`]: super::Client::post_get_compression_signatures_for_address*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressionSignaturesForAddress<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressionSignaturesForAddress<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressionSignaturesForAddressBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressionSignaturesForAddressBody, + ) -> types::builder::PostGetCompressionSignaturesForAddressBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressionSignaturesForAddress` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressionSignaturesForAddressBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressionSignaturesForAddress", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compression_signatures_for_address", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compression_signatures_for_owner`] + +[`Client::post_get_compression_signatures_for_owner`]: super::Client::post_get_compression_signatures_for_owner*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressionSignaturesForOwner<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetCompressionSignaturesForOwner<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressionSignaturesForOwnerBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressionSignaturesForOwnerBody, + ) -> types::builder::PostGetCompressionSignaturesForOwnerBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressionSignaturesForOwner` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressionSignaturesForOwnerBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getCompressionSignaturesForOwner", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compression_signatures_for_owner", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_compression_signatures_for_token_owner`] + +[`Client::post_get_compression_signatures_for_token_owner`]: super::Client::post_get_compression_signatures_for_token_owner*/ + #[derive(Debug, Clone)] + pub struct PostGetCompressionSignaturesForTokenOwner<'a> { + client: &'a super::Client, + body: Result< + types::builder::PostGetCompressionSignaturesForTokenOwnerBody, + String, + >, + } + impl<'a> PostGetCompressionSignaturesForTokenOwner<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto< + types::PostGetCompressionSignaturesForTokenOwnerBody, + >, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetCompressionSignaturesForTokenOwnerBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetCompressionSignaturesForTokenOwnerBody, + ) -> types::builder::PostGetCompressionSignaturesForTokenOwnerBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getCompressionSignaturesForTokenOwner` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetCompressionSignaturesForTokenOwnerBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!( + "{}/getCompressionSignaturesForTokenOwner", client.baseurl, + ); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_compression_signatures_for_token_owner", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_indexer_health`] + +[`Client::post_get_indexer_health`]: super::Client::post_get_indexer_health*/ + #[derive(Debug, Clone)] + pub struct PostGetIndexerHealth<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetIndexerHealth<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetIndexerHealthBody` for body failed: {}", s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetIndexerHealthBody, + ) -> types::builder::PostGetIndexerHealthBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getIndexerHealth` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetIndexerHealthBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getIndexerHealth", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_indexer_health", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_indexer_slot`] + +[`Client::post_get_indexer_slot`]: super::Client::post_get_indexer_slot*/ + #[derive(Debug, Clone)] + pub struct PostGetIndexerSlot<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetIndexerSlot<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetIndexerSlotBody` for body failed: {}", s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetIndexerSlotBody, + ) -> types::builder::PostGetIndexerSlotBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getIndexerSlot` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetIndexerSlotBody::try_from(v).map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getIndexerSlot", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_indexer_slot", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_latest_compression_signatures`] + +[`Client::post_get_latest_compression_signatures`]: super::Client::post_get_latest_compression_signatures*/ + #[derive(Debug, Clone)] + pub struct PostGetLatestCompressionSignatures<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetLatestCompressionSignatures<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetLatestCompressionSignaturesBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetLatestCompressionSignaturesBody, + ) -> types::builder::PostGetLatestCompressionSignaturesBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getLatestCompressionSignatures` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetLatestCompressionSignaturesBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getLatestCompressionSignatures", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_latest_compression_signatures", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_latest_non_voting_signatures`] + +[`Client::post_get_latest_non_voting_signatures`]: super::Client::post_get_latest_non_voting_signatures*/ + #[derive(Debug, Clone)] + pub struct PostGetLatestNonVotingSignatures<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetLatestNonVotingSignatures<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetLatestNonVotingSignaturesBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetLatestNonVotingSignaturesBody, + ) -> types::builder::PostGetLatestNonVotingSignaturesBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getLatestNonVotingSignatures` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetLatestNonVotingSignaturesBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getLatestNonVotingSignatures", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_latest_non_voting_signatures", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_multiple_account_interfaces`] + +[`Client::post_get_multiple_account_interfaces`]: super::Client::post_get_multiple_account_interfaces*/ + #[derive(Debug, Clone)] + pub struct PostGetMultipleAccountInterfaces<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetMultipleAccountInterfaces<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetMultipleAccountInterfacesBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetMultipleAccountInterfacesBody, + ) -> types::builder::PostGetMultipleAccountInterfacesBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getMultipleAccountInterfaces` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetMultipleAccountInterfacesBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getMultipleAccountInterfaces", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_multiple_account_interfaces", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_multiple_compressed_account_proofs`] + +[`Client::post_get_multiple_compressed_account_proofs`]: super::Client::post_get_multiple_compressed_account_proofs*/ + #[derive(Debug, Clone)] + pub struct PostGetMultipleCompressedAccountProofs<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetMultipleCompressedAccountProofs<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetMultipleCompressedAccountProofsBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetMultipleCompressedAccountProofsBody, + ) -> types::builder::PostGetMultipleCompressedAccountProofsBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getMultipleCompressedAccountProofs` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetMultipleCompressedAccountProofsBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getMultipleCompressedAccountProofs", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_multiple_compressed_account_proofs", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_multiple_compressed_account_proofs_v2`] + +[`Client::post_get_multiple_compressed_account_proofs_v2`]: super::Client::post_get_multiple_compressed_account_proofs_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetMultipleCompressedAccountProofsV2<'a> { + client: &'a super::Client, + body: Result< + types::builder::PostGetMultipleCompressedAccountProofsV2Body, + String, + >, + } + impl<'a> PostGetMultipleCompressedAccountProofsV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto< + types::PostGetMultipleCompressedAccountProofsV2Body, + >, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetMultipleCompressedAccountProofsV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetMultipleCompressedAccountProofsV2Body, + ) -> types::builder::PostGetMultipleCompressedAccountProofsV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getMultipleCompressedAccountProofsV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetMultipleCompressedAccountProofsV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!( + "{}/getMultipleCompressedAccountProofsV2", client.baseurl, + ); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_multiple_compressed_account_proofs_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_multiple_compressed_accounts`] + +[`Client::post_get_multiple_compressed_accounts`]: super::Client::post_get_multiple_compressed_accounts*/ + #[derive(Debug, Clone)] + pub struct PostGetMultipleCompressedAccounts<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetMultipleCompressedAccounts<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetMultipleCompressedAccountsBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetMultipleCompressedAccountsBody, + ) -> types::builder::PostGetMultipleCompressedAccountsBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getMultipleCompressedAccounts` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetMultipleCompressedAccountsBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getMultipleCompressedAccounts", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_multiple_compressed_accounts", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_multiple_compressed_accounts_v2`] + +[`Client::post_get_multiple_compressed_accounts_v2`]: super::Client::post_get_multiple_compressed_accounts_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetMultipleCompressedAccountsV2<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetMultipleCompressedAccountsV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetMultipleCompressedAccountsV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetMultipleCompressedAccountsV2Body, + ) -> types::builder::PostGetMultipleCompressedAccountsV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getMultipleCompressedAccountsV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetMultipleCompressedAccountsV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getMultipleCompressedAccountsV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_multiple_compressed_accounts_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_multiple_new_address_proofs`] + +[`Client::post_get_multiple_new_address_proofs`]: super::Client::post_get_multiple_new_address_proofs*/ + #[derive(Debug, Clone)] + pub struct PostGetMultipleNewAddressProofs<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetMultipleNewAddressProofs<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetMultipleNewAddressProofsBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetMultipleNewAddressProofsBody, + ) -> types::builder::PostGetMultipleNewAddressProofsBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getMultipleNewAddressProofs` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetMultipleNewAddressProofsBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getMultipleNewAddressProofs", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_multiple_new_address_proofs", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_multiple_new_address_proofs_v2`] + +[`Client::post_get_multiple_new_address_proofs_v2`]: super::Client::post_get_multiple_new_address_proofs_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetMultipleNewAddressProofsV2<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetMultipleNewAddressProofsV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetMultipleNewAddressProofsV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetMultipleNewAddressProofsV2Body, + ) -> types::builder::PostGetMultipleNewAddressProofsV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getMultipleNewAddressProofsV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetMultipleNewAddressProofsV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getMultipleNewAddressProofsV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_multiple_new_address_proofs_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_queue_elements`] + +[`Client::post_get_queue_elements`]: super::Client::post_get_queue_elements*/ + #[derive(Debug, Clone)] + pub struct PostGetQueueElements<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetQueueElements<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetQueueElementsBody` for body failed: {}", s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetQueueElementsBody, + ) -> types::builder::PostGetQueueElementsBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getQueueElements` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetQueueElementsBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getQueueElements", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_queue_elements", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_queue_info`] + +[`Client::post_get_queue_info`]: super::Client::post_get_queue_info*/ + #[derive(Debug, Clone)] + pub struct PostGetQueueInfo<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetQueueInfo<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetQueueInfoBody` for body failed: {}", s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetQueueInfoBody, + ) -> types::builder::PostGetQueueInfoBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getQueueInfo` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetQueueInfoBody::try_from(v).map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getQueueInfo", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_queue_info", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_token_account_interface`] + +[`Client::post_get_token_account_interface`]: super::Client::post_get_token_account_interface*/ + #[derive(Debug, Clone)] + pub struct PostGetTokenAccountInterface<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetTokenAccountInterface<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetTokenAccountInterfaceBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetTokenAccountInterfaceBody, + ) -> types::builder::PostGetTokenAccountInterfaceBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getTokenAccountInterface` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetTokenAccountInterfaceBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getTokenAccountInterface", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_token_account_interface", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_token_account_interfaces`] + +[`Client::post_get_token_account_interfaces`]: super::Client::post_get_token_account_interfaces*/ + #[derive(Debug, Clone)] + pub struct PostGetTokenAccountInterfaces<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetTokenAccountInterfaces<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetTokenAccountInterfacesBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetTokenAccountInterfacesBody, + ) -> types::builder::PostGetTokenAccountInterfacesBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getTokenAccountInterfaces` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetTokenAccountInterfacesBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getTokenAccountInterfaces", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_token_account_interfaces", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_transaction_with_compression_info`] + +[`Client::post_get_transaction_with_compression_info`]: super::Client::post_get_transaction_with_compression_info*/ + #[derive(Debug, Clone)] + pub struct PostGetTransactionWithCompressionInfo<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetTransactionWithCompressionInfo<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetTransactionWithCompressionInfoBody` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetTransactionWithCompressionInfoBody, + ) -> types::builder::PostGetTransactionWithCompressionInfoBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getTransactionWithCompressionInfo` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetTransactionWithCompressionInfoBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getTransactionWithCompressionInfo", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_transaction_with_compression_info", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_transaction_with_compression_info_v2`] + +[`Client::post_get_transaction_with_compression_info_v2`]: super::Client::post_get_transaction_with_compression_info_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetTransactionWithCompressionInfoV2<'a> { + client: &'a super::Client, + body: Result< + types::builder::PostGetTransactionWithCompressionInfoV2Body, + String, + >, + } + impl<'a> PostGetTransactionWithCompressionInfoV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetTransactionWithCompressionInfoV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetTransactionWithCompressionInfoV2Body, + ) -> types::builder::PostGetTransactionWithCompressionInfoV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getTransactionWithCompressionInfoV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetTransactionWithCompressionInfoV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getTransactionWithCompressionInfoV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_transaction_with_compression_info_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_validity_proof`] + +[`Client::post_get_validity_proof`]: super::Client::post_get_validity_proof*/ + #[derive(Debug, Clone)] + pub struct PostGetValidityProof<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetValidityProof<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetValidityProofBody` for body failed: {}", s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetValidityProofBody, + ) -> types::builder::PostGetValidityProofBody, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getValidityProof` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetValidityProofBody::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getValidityProof", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_validity_proof", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } + /**Builder for [`Client::post_get_validity_proof_v2`] + +[`Client::post_get_validity_proof_v2`]: super::Client::post_get_validity_proof_v2*/ + #[derive(Debug, Clone)] + pub struct PostGetValidityProofV2<'a> { + client: &'a super::Client, + body: Result, + } + impl<'a> PostGetValidityProofV2<'a> { + pub fn new(client: &'a super::Client) -> Self { + Self { + client: client, + body: Ok(::std::default::Default::default()), + } + } + pub fn body(mut self, value: V) -> Self + where + V: std::convert::TryInto, + >::Error: std::fmt::Display, + { + self.body = value + .try_into() + .map(From::from) + .map_err(|s| { + format!( + "conversion to `PostGetValidityProofV2Body` for body failed: {}", + s + ) + }); + self + } + pub fn body_map(mut self, f: F) -> Self + where + F: std::ops::FnOnce( + types::builder::PostGetValidityProofV2Body, + ) -> types::builder::PostGetValidityProofV2Body, + { + self.body = self.body.map(f); + self + } + ///Sends a `POST` request to `/getValidityProofV2` + pub async fn send( + self, + ) -> Result< + ResponseValue, + Error, + > { + let Self { client, body } = self; + let body = body + .and_then(|v| { + types::PostGetValidityProofV2Body::try_from(v) + .map_err(|e| e.to_string()) + }) + .map_err(Error::InvalidRequest)?; + let url = format!("{}/getValidityProofV2", client.baseurl,); + let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize); + header_map + .append( + ::reqwest::header::HeaderName::from_static("api-version"), + ::reqwest::header::HeaderValue::from_static( + super::Client::api_version(), + ), + ); + #[allow(unused_mut)] + let mut request = client + .client + .post(url) + .header( + ::reqwest::header::ACCEPT, + ::reqwest::header::HeaderValue::from_static("application/json"), + ) + .json(&body) + .headers(header_map) + .build()?; + let info = OperationInfo { + operation_id: "post_get_validity_proof_v2", + }; + client.pre(&mut request, &info).await?; + let result = client.exec(request, &info).await; + client.post(&result, &info).await?; + let response = result?; + match response.status().as_u16() { + 200u16 => ResponseValue::from_response(response).await, + 429u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + 500u16 => { + Err( + Error::ErrorResponse( + ResponseValue::from_response(response).await?, + ), + ) + } + _ => Err(Error::UnexpectedResponse(response)), + } + } + } +} +/// Items consumers will typically use such as the Client. +pub mod prelude { + pub use self::super::Client; +} diff --git a/sdk-libs/photon-api/src/lib.rs b/sdk-libs/photon-api/src/lib.rs index 92760eb50e..63d10a0b1c 100644 --- a/sdk-libs/photon-api/src/lib.rs +++ b/sdk-libs/photon-api/src/lib.rs @@ -1,12 +1,794 @@ -#![allow(unused_imports)] +//! Photon API client generated from OpenAPI spec using progenitor. +//! +//! This crate provides a Rust client for the Photon indexer API. +//! Types are pre-generated by progenitor and checked in; HTTP calls use reqwest directly. +//! To regenerate after spec changes: `cargo build -p photon-api --features generate` -#[macro_use] -extern crate serde_derive; +#![allow(unused_imports, clippy::all, dead_code)] +#![allow(mismatched_lifetime_syntaxes)] -extern crate reqwest; -extern crate serde; -extern crate serde_json; -extern crate url; +// Include the pre-generated progenitor types (checked in). +// To regenerate after OpenAPI spec changes: cargo build -p photon-api --features generate +include!("codegen.rs"); -pub mod apis; -pub mod models; +pub mod apis { + use super::*; + + /// Configuration for the Photon API client. + #[derive(Clone)] + pub struct Configuration { + pub base_path: String, + pub api_key: Option, + pub client: reqwest::Client, + } + + impl std::fmt::Debug for Configuration { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Configuration") + .field("base_path", &self.base_path) + .finish() + } + } + + impl Default for Configuration { + fn default() -> Self { + Self { + base_path: "https://devnet.helius-rpc.com".to_string(), + api_key: None, + client: reqwest::Client::new(), + } + } + } + + impl Configuration { + /// Create a new configuration from a URL string. + /// + /// If the URL contains an `api-key` query parameter, it is extracted + /// and appended to every request as `?api-key=KEY`. + /// + /// ```ignore + /// // Without API key + /// let config = Configuration::new("https://rpc.example.com".to_string()); + /// + /// // With API key + /// let config = Configuration::new("https://rpc.example.com?api-key=YOUR_KEY".to_string()); + /// ``` + pub fn new(url: String) -> Self { + let (base_path, api_key) = Self::parse_url(&url); + Self { + base_path, + api_key, + client: reqwest::Client::new(), + } + } + + fn build_url(&self, endpoint: &str) -> String { + match &self.api_key { + Some(key) => format!("{}/{}?api-key={}", self.base_path, endpoint, key), + None => format!("{}/{}", self.base_path, endpoint), + } + } + + pub(crate) fn parse_url(url: &str) -> (String, Option) { + if let Some(query_start) = url.find('?') { + let base = &url[..query_start]; + let query = &url[query_start + 1..]; + for param in query.split('&') { + if let Some(value) = param.strip_prefix("api-key=") { + return (base.to_string(), Some(value.to_string())); + } + } + (url.to_string(), None) + } else { + (url.to_string(), None) + } + } + } + + pub mod configuration { + pub use super::Configuration; + } + + /// Error type for API calls. + #[derive(Debug)] + pub enum Error { + Reqwest(reqwest::Error), + ResponseError { + status: u16, + body: String, + }, + #[doc(hidden)] + _Phantom(std::marker::PhantomData), + } + + impl std::fmt::Display for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Error::Reqwest(e) => write!(f, "HTTP error: {}", e), + Error::ResponseError { status, body } => { + write!(f, "Error response (status {}): {}", status, body) + } + Error::_Phantom(_) => unreachable!(), + } + } + } + + /// Default API module providing function-style API calls. + pub mod default_api { + use super::*; + + // ---------------------------------------------------------------- + // Body construction helper functions + // ---------------------------------------------------------------- + + pub fn make_get_compressed_account_body( + params: types::PostGetCompressedAccountBodyParams, + ) -> types::PostGetCompressedAccountBody { + types::PostGetCompressedAccountBody { + id: types::PostGetCompressedAccountBodyId::TestAccount, + jsonrpc: types::PostGetCompressedAccountBodyJsonrpc::X20, + method: types::PostGetCompressedAccountBodyMethod::GetCompressedAccount, + params, + } + } + + pub fn make_get_compressed_account_balance_body( + params: types::PostGetCompressedAccountBalanceBodyParams, + ) -> types::PostGetCompressedAccountBalanceBody { + types::PostGetCompressedAccountBalanceBody { + id: types::PostGetCompressedAccountBalanceBodyId::TestAccount, + jsonrpc: types::PostGetCompressedAccountBalanceBodyJsonrpc::X20, + method: + types::PostGetCompressedAccountBalanceBodyMethod::GetCompressedAccountBalance, + params, + } + } + + pub fn make_get_compressed_accounts_by_owner_v2_body( + params: types::PostGetCompressedAccountsByOwnerV2BodyParams, + ) -> types::PostGetCompressedAccountsByOwnerV2Body { + types::PostGetCompressedAccountsByOwnerV2Body { + id: types::PostGetCompressedAccountsByOwnerV2BodyId::TestAccount, + jsonrpc: types::PostGetCompressedAccountsByOwnerV2BodyJsonrpc::X20, + method: types::PostGetCompressedAccountsByOwnerV2BodyMethod::GetCompressedAccountsByOwnerV2, + params, + } + } + + pub fn make_get_compressed_balance_by_owner_body( + params: types::PostGetCompressedBalanceByOwnerBodyParams, + ) -> types::PostGetCompressedBalanceByOwnerBody { + types::PostGetCompressedBalanceByOwnerBody { + id: types::PostGetCompressedBalanceByOwnerBodyId::TestAccount, + jsonrpc: types::PostGetCompressedBalanceByOwnerBodyJsonrpc::X20, + method: + types::PostGetCompressedBalanceByOwnerBodyMethod::GetCompressedBalanceByOwner, + params, + } + } + + pub fn make_get_compressed_mint_token_holders_body( + params: types::PostGetCompressedMintTokenHoldersBodyParams, + ) -> types::PostGetCompressedMintTokenHoldersBody { + types::PostGetCompressedMintTokenHoldersBody { + id: types::PostGetCompressedMintTokenHoldersBodyId::TestAccount, + jsonrpc: types::PostGetCompressedMintTokenHoldersBodyJsonrpc::X20, + method: types::PostGetCompressedMintTokenHoldersBodyMethod::GetCompressedMintTokenHolders, + params, + } + } + + pub fn make_get_compressed_token_account_balance_body( + params: types::PostGetCompressedTokenAccountBalanceBodyParams, + ) -> types::PostGetCompressedTokenAccountBalanceBody { + types::PostGetCompressedTokenAccountBalanceBody { + id: types::PostGetCompressedTokenAccountBalanceBodyId::TestAccount, + jsonrpc: types::PostGetCompressedTokenAccountBalanceBodyJsonrpc::X20, + method: types::PostGetCompressedTokenAccountBalanceBodyMethod::GetCompressedTokenAccountBalance, + params, + } + } + + pub fn make_get_validity_proof_v2_body( + params: types::PostGetValidityProofV2BodyParams, + ) -> types::PostGetValidityProofV2Body { + types::PostGetValidityProofV2Body { + id: types::PostGetValidityProofV2BodyId::TestAccount, + jsonrpc: types::PostGetValidityProofV2BodyJsonrpc::X20, + method: types::PostGetValidityProofV2BodyMethod::GetValidityProofV2, + params, + } + } + + pub fn make_get_multiple_new_address_proofs_v2_body( + params: Vec, + ) -> types::PostGetMultipleNewAddressProofsV2Body { + types::PostGetMultipleNewAddressProofsV2Body { + id: types::PostGetMultipleNewAddressProofsV2BodyId::TestAccount, + jsonrpc: types::PostGetMultipleNewAddressProofsV2BodyJsonrpc::X20, + method: types::PostGetMultipleNewAddressProofsV2BodyMethod::GetMultipleNewAddressProofsV2, + params, + } + } + + pub fn make_get_compressed_token_accounts_by_delegate_v2_body( + params: types::PostGetCompressedTokenAccountsByDelegateV2BodyParams, + ) -> types::PostGetCompressedTokenAccountsByDelegateV2Body { + types::PostGetCompressedTokenAccountsByDelegateV2Body { + id: types::PostGetCompressedTokenAccountsByDelegateV2BodyId::TestAccount, + jsonrpc: types::PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc::X20, + method: types::PostGetCompressedTokenAccountsByDelegateV2BodyMethod::GetCompressedTokenAccountsByDelegateV2, + params, + } + } + + pub fn make_get_compressed_token_accounts_by_owner_v2_body( + params: types::PostGetCompressedTokenAccountsByOwnerV2BodyParams, + ) -> types::PostGetCompressedTokenAccountsByOwnerV2Body { + types::PostGetCompressedTokenAccountsByOwnerV2Body { + id: types::PostGetCompressedTokenAccountsByOwnerV2BodyId::TestAccount, + jsonrpc: types::PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc::X20, + method: types::PostGetCompressedTokenAccountsByOwnerV2BodyMethod::GetCompressedTokenAccountsByOwnerV2, + params, + } + } + + pub fn make_get_compressed_token_balances_by_owner_v2_body( + params: types::PostGetCompressedTokenBalancesByOwnerV2BodyParams, + ) -> types::PostGetCompressedTokenBalancesByOwnerV2Body { + types::PostGetCompressedTokenBalancesByOwnerV2Body { + id: types::PostGetCompressedTokenBalancesByOwnerV2BodyId::TestAccount, + jsonrpc: types::PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc::X20, + method: types::PostGetCompressedTokenBalancesByOwnerV2BodyMethod::GetCompressedTokenBalancesByOwnerV2, + params, + } + } + + pub fn make_get_compression_signatures_for_account_body( + params: types::PostGetCompressionSignaturesForAccountBodyParams, + ) -> types::PostGetCompressionSignaturesForAccountBody { + types::PostGetCompressionSignaturesForAccountBody { + id: types::PostGetCompressionSignaturesForAccountBodyId::TestAccount, + jsonrpc: types::PostGetCompressionSignaturesForAccountBodyJsonrpc::X20, + method: types::PostGetCompressionSignaturesForAccountBodyMethod::GetCompressionSignaturesForAccount, + params, + } + } + + pub fn make_get_compression_signatures_for_address_body( + params: types::PostGetCompressionSignaturesForAddressBodyParams, + ) -> types::PostGetCompressionSignaturesForAddressBody { + types::PostGetCompressionSignaturesForAddressBody { + id: types::PostGetCompressionSignaturesForAddressBodyId::TestAccount, + jsonrpc: types::PostGetCompressionSignaturesForAddressBodyJsonrpc::X20, + method: types::PostGetCompressionSignaturesForAddressBodyMethod::GetCompressionSignaturesForAddress, + params, + } + } + + pub fn make_get_compression_signatures_for_owner_body( + params: types::PostGetCompressionSignaturesForOwnerBodyParams, + ) -> types::PostGetCompressionSignaturesForOwnerBody { + types::PostGetCompressionSignaturesForOwnerBody { + id: types::PostGetCompressionSignaturesForOwnerBodyId::TestAccount, + jsonrpc: types::PostGetCompressionSignaturesForOwnerBodyJsonrpc::X20, + method: types::PostGetCompressionSignaturesForOwnerBodyMethod::GetCompressionSignaturesForOwner, + params, + } + } + + pub fn make_get_compression_signatures_for_token_owner_body( + params: types::PostGetCompressionSignaturesForTokenOwnerBodyParams, + ) -> types::PostGetCompressionSignaturesForTokenOwnerBody { + types::PostGetCompressionSignaturesForTokenOwnerBody { + id: types::PostGetCompressionSignaturesForTokenOwnerBodyId::TestAccount, + jsonrpc: types::PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc::X20, + method: types::PostGetCompressionSignaturesForTokenOwnerBodyMethod::GetCompressionSignaturesForTokenOwner, + params, + } + } + + pub fn make_get_indexer_health_body() -> types::PostGetIndexerHealthBody { + types::PostGetIndexerHealthBody { + id: types::PostGetIndexerHealthBodyId::TestAccount, + jsonrpc: types::PostGetIndexerHealthBodyJsonrpc::X20, + method: types::PostGetIndexerHealthBodyMethod::GetIndexerHealth, + } + } + + pub fn make_get_indexer_slot_body() -> types::PostGetIndexerSlotBody { + types::PostGetIndexerSlotBody { + id: types::PostGetIndexerSlotBodyId::TestAccount, + jsonrpc: types::PostGetIndexerSlotBodyJsonrpc::X20, + method: types::PostGetIndexerSlotBodyMethod::GetIndexerSlot, + } + } + + pub fn make_get_multiple_compressed_account_proofs_body( + params: Vec, + ) -> types::PostGetMultipleCompressedAccountProofsBody { + types::PostGetMultipleCompressedAccountProofsBody { + id: types::PostGetMultipleCompressedAccountProofsBodyId::TestAccount, + jsonrpc: types::PostGetMultipleCompressedAccountProofsBodyJsonrpc::X20, + method: types::PostGetMultipleCompressedAccountProofsBodyMethod::GetMultipleCompressedAccountProofs, + params, + } + } + + pub fn make_get_multiple_compressed_accounts_body( + params: types::PostGetMultipleCompressedAccountsBodyParams, + ) -> types::PostGetMultipleCompressedAccountsBody { + types::PostGetMultipleCompressedAccountsBody { + id: types::PostGetMultipleCompressedAccountsBodyId::TestAccount, + jsonrpc: types::PostGetMultipleCompressedAccountsBodyJsonrpc::X20, + method: types::PostGetMultipleCompressedAccountsBodyMethod::GetMultipleCompressedAccounts, + params, + } + } + + pub fn make_get_validity_proof_body( + params: types::PostGetValidityProofBodyParams, + ) -> types::PostGetValidityProofBody { + types::PostGetValidityProofBody { + id: types::PostGetValidityProofBodyId::TestAccount, + jsonrpc: types::PostGetValidityProofBodyJsonrpc::X20, + method: types::PostGetValidityProofBodyMethod::GetValidityProof, + params, + } + } + + pub fn make_get_queue_elements_body( + params: types::PostGetQueueElementsBodyParams, + ) -> types::PostGetQueueElementsBody { + types::PostGetQueueElementsBody { + id: types::PostGetQueueElementsBodyId::TestAccount, + jsonrpc: types::PostGetQueueElementsBodyJsonrpc::X20, + method: types::PostGetQueueElementsBodyMethod::GetQueueElements, + params, + } + } + + pub fn make_get_queue_info_body( + params: types::PostGetQueueInfoBodyParams, + ) -> types::PostGetQueueInfoBody { + types::PostGetQueueInfoBody { + id: types::PostGetQueueInfoBodyId::TestAccount, + jsonrpc: types::PostGetQueueInfoBodyJsonrpc::X20, + method: types::PostGetQueueInfoBodyMethod::GetQueueInfo, + params, + } + } + + pub fn make_get_account_interface_body( + params: types::PostGetAccountInterfaceBodyParams, + ) -> types::PostGetAccountInterfaceBody { + types::PostGetAccountInterfaceBody { + id: types::PostGetAccountInterfaceBodyId::TestAccount, + jsonrpc: types::PostGetAccountInterfaceBodyJsonrpc::X20, + method: types::PostGetAccountInterfaceBodyMethod::GetAccountInterface, + params, + } + } + + pub fn make_get_token_account_interface_body( + params: types::PostGetTokenAccountInterfaceBodyParams, + ) -> types::PostGetTokenAccountInterfaceBody { + types::PostGetTokenAccountInterfaceBody { + id: types::PostGetTokenAccountInterfaceBodyId::TestAccount, + jsonrpc: types::PostGetTokenAccountInterfaceBodyJsonrpc::X20, + method: types::PostGetTokenAccountInterfaceBodyMethod::GetTokenAccountInterface, + params, + } + } + + pub fn make_get_ata_interface_body( + params: types::PostGetAtaInterfaceBodyParams, + ) -> types::PostGetAtaInterfaceBody { + types::PostGetAtaInterfaceBody { + id: types::PostGetAtaInterfaceBodyId::TestAccount, + jsonrpc: types::PostGetAtaInterfaceBodyJsonrpc::X20, + method: types::PostGetAtaInterfaceBodyMethod::GetAtaInterface, + params, + } + } + + pub fn make_get_multiple_account_interfaces_body( + params: types::PostGetMultipleAccountInterfacesBodyParams, + ) -> types::PostGetMultipleAccountInterfacesBody { + types::PostGetMultipleAccountInterfacesBody { + id: types::PostGetMultipleAccountInterfacesBodyId::TestAccount, + jsonrpc: types::PostGetMultipleAccountInterfacesBodyJsonrpc::X20, + method: + types::PostGetMultipleAccountInterfacesBodyMethod::GetMultipleAccountInterfaces, + params, + } + } + + // ---------------------------------------------------------------- + // API call functions — direct reqwest, progenitor types for serde + // ---------------------------------------------------------------- + + macro_rules! api_call { + ($fn_name:ident, $endpoint:expr, $body_type:ty, $response_type:ty) => { + pub async fn $fn_name( + configuration: &Configuration, + body: $body_type, + ) -> Result<$response_type, Error<$response_type>> { + let url = configuration.build_url($endpoint); + let response = configuration + .client + .post(&url) + .header(reqwest::header::ACCEPT, "application/json") + .json(&body) + .send() + .await + .map_err(Error::Reqwest)?; + + let status = response.status().as_u16(); + if status == 200 { + response + .json::<$response_type>() + .await + .map_err(Error::Reqwest) + } else { + let body = response.text().await.unwrap_or_default(); + Err(Error::ResponseError { status, body }) + } + } + }; + } + + api_call!( + get_compressed_account_post, + "getCompressedAccount", + types::PostGetCompressedAccountBody, + types::PostGetCompressedAccountResponse + ); + api_call!( + get_compressed_account_balance_post, + "getCompressedAccountBalance", + types::PostGetCompressedAccountBalanceBody, + types::PostGetCompressedAccountBalanceResponse + ); + api_call!( + get_compressed_accounts_by_owner_post, + "getCompressedAccountsByOwner", + types::PostGetCompressedAccountsByOwnerBody, + types::PostGetCompressedAccountsByOwnerResponse + ); + api_call!( + get_compressed_accounts_by_owner_v2_post, + "getCompressedAccountsByOwnerV2", + types::PostGetCompressedAccountsByOwnerV2Body, + types::PostGetCompressedAccountsByOwnerV2Response + ); + api_call!( + get_compressed_balance_by_owner_post, + "getCompressedBalanceByOwner", + types::PostGetCompressedBalanceByOwnerBody, + types::PostGetCompressedBalanceByOwnerResponse + ); + api_call!( + get_compressed_mint_token_holders_post, + "getCompressedMintTokenHolders", + types::PostGetCompressedMintTokenHoldersBody, + types::PostGetCompressedMintTokenHoldersResponse + ); + api_call!( + get_compressed_token_account_balance_post, + "getCompressedTokenAccountBalance", + types::PostGetCompressedTokenAccountBalanceBody, + types::PostGetCompressedTokenAccountBalanceResponse + ); + api_call!( + get_compressed_token_accounts_by_delegate_post, + "getCompressedTokenAccountsByDelegate", + types::PostGetCompressedTokenAccountsByDelegateBody, + types::PostGetCompressedTokenAccountsByDelegateResponse + ); + api_call!( + get_compressed_token_accounts_by_delegate_v2_post, + "getCompressedTokenAccountsByDelegateV2", + types::PostGetCompressedTokenAccountsByDelegateV2Body, + types::PostGetCompressedTokenAccountsByDelegateV2Response + ); + api_call!( + get_compressed_token_accounts_by_owner_post, + "getCompressedTokenAccountsByOwner", + types::PostGetCompressedTokenAccountsByOwnerBody, + types::PostGetCompressedTokenAccountsByOwnerResponse + ); + api_call!( + get_compressed_token_accounts_by_owner_v2_post, + "getCompressedTokenAccountsByOwnerV2", + types::PostGetCompressedTokenAccountsByOwnerV2Body, + types::PostGetCompressedTokenAccountsByOwnerV2Response + ); + api_call!( + get_compressed_token_balances_by_owner_post, + "getCompressedTokenBalancesByOwner", + types::PostGetCompressedTokenBalancesByOwnerBody, + types::PostGetCompressedTokenBalancesByOwnerResponse + ); + api_call!( + get_compressed_token_balances_by_owner_v2_post, + "getCompressedTokenBalancesByOwnerV2", + types::PostGetCompressedTokenBalancesByOwnerV2Body, + types::PostGetCompressedTokenBalancesByOwnerV2Response + ); + api_call!( + get_compression_signatures_for_account_post, + "getCompressionSignaturesForAccount", + types::PostGetCompressionSignaturesForAccountBody, + types::PostGetCompressionSignaturesForAccountResponse + ); + api_call!( + get_compression_signatures_for_address_post, + "getCompressionSignaturesForAddress", + types::PostGetCompressionSignaturesForAddressBody, + types::PostGetCompressionSignaturesForAddressResponse + ); + api_call!( + get_compression_signatures_for_owner_post, + "getCompressionSignaturesForOwner", + types::PostGetCompressionSignaturesForOwnerBody, + types::PostGetCompressionSignaturesForOwnerResponse + ); + api_call!( + get_compression_signatures_for_token_owner_post, + "getCompressionSignaturesForTokenOwner", + types::PostGetCompressionSignaturesForTokenOwnerBody, + types::PostGetCompressionSignaturesForTokenOwnerResponse + ); + api_call!( + get_indexer_health_post, + "getIndexerHealth", + types::PostGetIndexerHealthBody, + types::PostGetIndexerHealthResponse + ); + api_call!( + get_indexer_slot_post, + "getIndexerSlot", + types::PostGetIndexerSlotBody, + types::PostGetIndexerSlotResponse + ); + api_call!( + get_multiple_compressed_account_proofs_post, + "getMultipleCompressedAccountProofs", + types::PostGetMultipleCompressedAccountProofsBody, + types::PostGetMultipleCompressedAccountProofsResponse + ); + api_call!( + get_multiple_compressed_accounts_post, + "getMultipleCompressedAccounts", + types::PostGetMultipleCompressedAccountsBody, + types::PostGetMultipleCompressedAccountsResponse + ); + api_call!( + get_multiple_new_address_proofs_v2_post, + "getMultipleNewAddressProofsV2", + types::PostGetMultipleNewAddressProofsV2Body, + types::PostGetMultipleNewAddressProofsV2Response + ); + api_call!( + get_validity_proof_post, + "getValidityProof", + types::PostGetValidityProofBody, + types::PostGetValidityProofResponse + ); + api_call!( + get_validity_proof_v2_post, + "getValidityProofV2", + types::PostGetValidityProofV2Body, + types::PostGetValidityProofV2Response + ); + api_call!( + get_queue_elements_post, + "getQueueElements", + types::PostGetQueueElementsBody, + types::PostGetQueueElementsResponse + ); + api_call!( + get_queue_info_post, + "getQueueInfo", + types::PostGetQueueInfoBody, + types::PostGetQueueInfoResponse + ); + api_call!( + get_account_interface_post, + "getAccountInterface", + types::PostGetAccountInterfaceBody, + types::PostGetAccountInterfaceResponse + ); + api_call!( + get_token_account_interface_post, + "getTokenAccountInterface", + types::PostGetTokenAccountInterfaceBody, + types::PostGetTokenAccountInterfaceResponse + ); + api_call!( + get_ata_interface_post, + "getAtaInterface", + types::PostGetAtaInterfaceBody, + types::PostGetAtaInterfaceResponse + ); + api_call!( + get_multiple_account_interfaces_post, + "getMultipleAccountInterfaces", + types::PostGetMultipleAccountInterfacesBody, + types::PostGetMultipleAccountInterfacesResponse + ); + } +} + +#[cfg(test)] +mod tests { + use super::apis::{configuration::Configuration, default_api}; + + #[test] + fn test_parse_url_with_api_key() { + let (base, key) = Configuration::parse_url("https://rpc.example.com?api-key=MY_KEY"); + assert_eq!(base, "https://rpc.example.com"); + assert_eq!(key, Some("MY_KEY".to_string())); + } + + #[test] + fn test_parse_url_without_api_key() { + let (base, key) = Configuration::parse_url("https://rpc.example.com"); + assert_eq!(base, "https://rpc.example.com"); + assert_eq!(key, None); + } + + #[test] + fn test_parse_url_with_other_query_params() { + let (base, key) = + Configuration::parse_url("https://rpc.example.com?other=value&api-key=KEY123"); + assert_eq!(base, "https://rpc.example.com"); + assert_eq!(key, Some("KEY123".to_string())); + } + + #[test] + fn test_new_with_api_key_in_url() { + let config = Configuration::new("https://rpc.example.com?api-key=SECRET".to_string()); + assert_eq!(config.base_path, "https://rpc.example.com"); + assert_eq!(config.api_key, Some("SECRET".to_string())); + } + + #[test] + fn test_make_get_compressed_account_body() { + let params = super::types::PostGetCompressedAccountBodyParams { + address: Some(super::types::SerializablePubkey( + "11111111111111111111111111111111".to_string(), + )), + hash: None, + }; + let body = default_api::make_get_compressed_account_body(params); + let json = serde_json::to_value(&body).unwrap(); + assert_eq!(json["jsonrpc"], "2.0"); + assert_eq!(json["method"], "getCompressedAccount"); + assert_eq!(json["id"], "test-account"); + assert_eq!( + json["params"]["address"], + "11111111111111111111111111111111" + ); + } + + #[test] + fn test_make_get_indexer_health_body() { + let body = default_api::make_get_indexer_health_body(); + let json = serde_json::to_value(&body).unwrap(); + assert_eq!(json["jsonrpc"], "2.0"); + assert_eq!(json["method"], "getIndexerHealth"); + } + + #[test] + fn test_make_get_indexer_slot_body() { + let body = default_api::make_get_indexer_slot_body(); + let json = serde_json::to_value(&body).unwrap(); + assert_eq!(json["jsonrpc"], "2.0"); + assert_eq!(json["method"], "getIndexerSlot"); + } + + #[test] + fn test_make_get_validity_proof_body() { + let params = super::types::PostGetValidityProofBodyParams { + hashes: vec![super::types::Hash("abc123".to_string())], + new_addresses_with_trees: vec![], + }; + let body = default_api::make_get_validity_proof_body(params); + let json = serde_json::to_value(&body).unwrap(); + assert_eq!(json["jsonrpc"], "2.0"); + assert_eq!(json["method"], "getValidityProof"); + assert_eq!(json["params"]["hashes"][0], "abc123"); + } + + #[tokio::test] + async fn test_api_call_sends_correct_request() { + use wiremock::{ + matchers::{header, method, path, query_param}, + Mock, MockServer, ResponseTemplate, + }; + + let mock_server = MockServer::start().await; + + let response_json = serde_json::json!({ + "jsonrpc": "2.0", + "result": "ok", + "id": "test-account" + }); + + Mock::given(method("POST")) + .and(path("/getIndexerHealth")) + .and(query_param("api-key", "TEST_KEY")) + .and(header("accept", "application/json")) + .respond_with(ResponseTemplate::new(200).set_body_json(&response_json)) + .mount(&mock_server) + .await; + + let config = Configuration::new(format!("{}?api-key=TEST_KEY", mock_server.uri())); + + let body = default_api::make_get_indexer_health_body(); + let result = default_api::get_indexer_health_post(&config, body).await; + + result.expect("API call with api-key should succeed"); + } + + #[tokio::test] + async fn test_api_call_without_api_key() { + use wiremock::{ + matchers::{header, method, path}, + Mock, MockServer, ResponseTemplate, + }; + + let mock_server = MockServer::start().await; + + let response_json = serde_json::json!({ + "jsonrpc": "2.0", + "result": "ok", + "id": "test-account" + }); + + Mock::given(method("POST")) + .and(path("/getIndexerHealth")) + .and(header("accept", "application/json")) + .respond_with(ResponseTemplate::new(200).set_body_json(&response_json)) + .mount(&mock_server) + .await; + + let config = Configuration::new(mock_server.uri()); + + let body = default_api::make_get_indexer_health_body(); + let result = default_api::get_indexer_health_post(&config, body).await; + + result.expect("API call without api-key should succeed"); + } + + #[tokio::test] + async fn test_api_call_error_response() { + use wiremock::{ + matchers::{method, path}, + Mock, MockServer, ResponseTemplate, + }; + + let mock_server = MockServer::start().await; + + Mock::given(method("POST")) + .and(path("/getIndexerHealth")) + .respond_with(ResponseTemplate::new(500).set_body_string("Internal Server Error")) + .mount(&mock_server) + .await; + + let config = Configuration::new(mock_server.uri()); + + let body = default_api::make_get_indexer_health_body(); + let result = default_api::get_indexer_health_post(&config, body).await; + + match result { + Err(super::apis::Error::ResponseError { status, body }) => { + assert_eq!(status, 500); + assert_eq!(body, "Internal Server Error"); + } + other => panic!("Expected ResponseError, got {:?}", other), + } + } +} diff --git a/sdk-libs/photon-api/src/models/_get_account_interface_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_account_interface_post_200_response.rs deleted file mode 100644 index 1dc4692b4f..0000000000 --- a/sdk-libs/photon-api/src/models/_get_account_interface_post_200_response.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetAccountInterfacePost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: String, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetAccountInterfacePost200Response { - pub fn new(id: String, jsonrpc: String) -> Self { - Self { - error: None, - id, - jsonrpc, - result: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_account_interface_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_account_interface_post_200_response_result.rs deleted file mode 100644 index e59fae1529..0000000000 --- a/sdk-libs/photon-api/src/models/_get_account_interface_post_200_response_result.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetAccountInterfacePost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option>, -} - -impl GetAccountInterfacePost200ResponseResult { - pub fn new(context: models::Context) -> Self { - Self { - context: Box::new(context), - value: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_account_interface_post_request.rs b/sdk-libs/photon-api/src/models/_get_account_interface_post_request.rs deleted file mode 100644 index dd4cc0e843..0000000000 --- a/sdk-libs/photon-api/src/models/_get_account_interface_post_request.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetAccountInterfacePostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: String, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: String, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetAccountInterfacePostRequest { - pub fn new(params: models::GetAccountInterfacePostRequestParams) -> Self { - Self { - id: "test-id".to_string(), - jsonrpc: "2.0".to_string(), - method: "getAccountInterface".to_string(), - params: Box::new(params), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_account_interface_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_account_interface_post_request_params.rs deleted file mode 100644 index d3b6238808..0000000000 --- a/sdk-libs/photon-api/src/models/_get_account_interface_post_request_params.rs +++ /dev/null @@ -1,22 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -/// GetAccountInterfacePostRequestParams : Request parameters for getAccountInterface -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetAccountInterfacePostRequestParams { - /// Account address to look up - #[serde(rename = "address")] - pub address: String, -} - -impl GetAccountInterfacePostRequestParams { - pub fn new(address: String) -> Self { - Self { address } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_ata_interface_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_ata_interface_post_200_response.rs deleted file mode 100644 index 5c7709912a..0000000000 --- a/sdk-libs/photon-api/src/models/_get_ata_interface_post_200_response.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetAtaInterfacePost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: String, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetAtaInterfacePost200Response { - pub fn new(id: String, jsonrpc: String) -> Self { - Self { - error: None, - id, - jsonrpc, - result: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_ata_interface_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_ata_interface_post_200_response_result.rs deleted file mode 100644 index f477f54d09..0000000000 --- a/sdk-libs/photon-api/src/models/_get_ata_interface_post_200_response_result.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetAtaInterfacePost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option>, -} - -impl GetAtaInterfacePost200ResponseResult { - pub fn new(context: models::Context) -> Self { - Self { - context: Box::new(context), - value: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_ata_interface_post_request.rs b/sdk-libs/photon-api/src/models/_get_ata_interface_post_request.rs deleted file mode 100644 index 81c36f3981..0000000000 --- a/sdk-libs/photon-api/src/models/_get_ata_interface_post_request.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetAtaInterfacePostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: String, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: String, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetAtaInterfacePostRequest { - pub fn new(params: models::GetAtaInterfacePostRequestParams) -> Self { - Self { - id: "test-id".to_string(), - jsonrpc: "2.0".to_string(), - method: "getAtaInterface".to_string(), - params: Box::new(params), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_ata_interface_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_ata_interface_post_request_params.rs deleted file mode 100644 index ea336353c5..0000000000 --- a/sdk-libs/photon-api/src/models/_get_ata_interface_post_request_params.rs +++ /dev/null @@ -1,25 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -/// GetAtaInterfacePostRequestParams : Request parameters for getAtaInterface -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetAtaInterfacePostRequestParams { - /// Owner address - #[serde(rename = "owner")] - pub owner: String, - /// Mint address - #[serde(rename = "mint")] - pub mint: String, -} - -impl GetAtaInterfacePostRequestParams { - pub fn new(owner: String, mint: String) -> Self { - Self { owner, mint } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response.rs deleted file mode 100644 index 8954e44e6d..0000000000 --- a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetBatchAddressUpdateInfoPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetBatchAddressUpdateInfoPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetBatchAddressUpdateInfoPost200Response { - GetBatchAddressUpdateInfoPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response_error.rs b/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response_error.rs deleted file mode 100644 index 915502e1b3..0000000000 --- a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response_error.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetBatchAddressUpdateInfoPost200ResponseError { - #[serde(rename = "code", skip_serializing_if = "Option::is_none")] - pub code: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl GetBatchAddressUpdateInfoPost200ResponseError { - pub fn new() -> GetBatchAddressUpdateInfoPost200ResponseError { - GetBatchAddressUpdateInfoPost200ResponseError { - code: None, - message: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response_result.rs deleted file mode 100644 index 2d30e4e946..0000000000 --- a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_200_response_result.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetBatchAddressUpdateInfoPost200ResponseResult { - #[serde(rename = "addresses")] - pub addresses: Vec, - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "nonInclusionProofs")] - pub non_inclusion_proofs: Vec, - #[serde(rename = "startIndex")] - pub start_index: u64, - #[serde(rename = "subtrees")] - pub subtrees: Vec>, -} - -impl GetBatchAddressUpdateInfoPost200ResponseResult { - pub fn new( - addresses: Vec, - context: models::Context, - non_inclusion_proofs: Vec, - start_index: u64, - subtrees: Vec>, - ) -> GetBatchAddressUpdateInfoPost200ResponseResult { - GetBatchAddressUpdateInfoPost200ResponseResult { - addresses, - context: Box::new(context), - non_inclusion_proofs, - start_index, - subtrees, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_429_response.rs b/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_429_response.rs deleted file mode 100644 index a288561b37..0000000000 --- a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_429_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetBatchAddressUpdateInfoPost429Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "jsonrpc", skip_serializing_if = "Option::is_none")] - pub jsonrpc: Option, -} - -impl GetBatchAddressUpdateInfoPost429Response { - pub fn new() -> GetBatchAddressUpdateInfoPost429Response { - GetBatchAddressUpdateInfoPost429Response { - error: None, - id: None, - jsonrpc: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_request.rs b/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_request.rs deleted file mode 100644 index 2715ab5c23..0000000000 --- a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetBatchAddressUpdateInfoPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetBatchAddressUpdateInfoPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetBatchAddressUpdateInfoPostRequestParams, - ) -> GetBatchAddressUpdateInfoPostRequest { - GetBatchAddressUpdateInfoPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getBatchAddressUpdateInfo")] - GetBatchAddressUpdateInfo, -} - -impl Default for Method { - fn default() -> Method { - Self::GetBatchAddressUpdateInfo - } -} diff --git a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_request_params.rs deleted file mode 100644 index 00ec863494..0000000000 --- a/sdk-libs/photon-api/src/models/_get_batch_address_update_info_post_request_params.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetBatchAddressUpdateInfoPostRequestParams { - #[serde(rename = "limit")] - pub limit: u16, - #[serde( - rename = "startQueueIndex", - default, - skip_serializing_if = "Option::is_none" - )] - pub start_queue_index: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "tree")] - pub tree: String, -} - -impl GetBatchAddressUpdateInfoPostRequestParams { - pub fn new(limit: u16, tree: String) -> GetBatchAddressUpdateInfoPostRequestParams { - GetBatchAddressUpdateInfoPostRequestParams { - limit, - start_queue_index: None, - tree, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_200_response.rs deleted file mode 100644 index 708ce72210..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountBalancePost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedAccountBalancePost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedAccountBalancePost200Response { - GetCompressedAccountBalancePost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_200_response_result.rs deleted file mode 100644 index 05856cb36c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountBalancePost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: u64, -} - -impl GetCompressedAccountBalancePost200ResponseResult { - pub fn new( - context: models::Context, - value: u64, - ) -> GetCompressedAccountBalancePost200ResponseResult { - GetCompressedAccountBalancePost200ResponseResult { - context: Box::new(context), - value, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_request.rs deleted file mode 100644 index 55a813d9e2..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_balance_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountBalancePostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedAccountBalancePostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountPostRequestParams, - ) -> GetCompressedAccountBalancePostRequest { - GetCompressedAccountBalancePostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedAccountBalance")] - GetCompressedAccountBalance, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedAccountBalance - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_post_200_response.rs deleted file mode 100644 index f223fad6bf..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedAccountPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedAccountPost200Response { - GetCompressedAccountPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_post_200_response_result.rs deleted file mode 100644 index 3f3cf6bb69..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_post_200_response_result.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option>, -} - -impl GetCompressedAccountPost200ResponseResult { - pub fn new(context: models::Context) -> GetCompressedAccountPost200ResponseResult { - GetCompressedAccountPost200ResponseResult { - context: Box::new(context), - value: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_post_request.rs deleted file mode 100644 index 45b784d5ae..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedAccountPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountPostRequestParams, - ) -> GetCompressedAccountPostRequest { - GetCompressedAccountPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedAccount")] - GetCompressedAccount, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedAccount - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_post_request_params.rs deleted file mode 100644 index 85ebafcde0..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_post_request_params.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -/// GetCompressedAccountPostRequestParams : Request for compressed account data -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountPostRequestParams { - /// A Solana public key represented as a base58 string. - #[serde(rename = "address", default, skip_serializing_if = "Option::is_none")] - pub address: Option, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "hash", default, skip_serializing_if = "Option::is_none")] - pub hash: Option, -} - -impl GetCompressedAccountPostRequestParams { - /// Request for compressed account data - pub fn new() -> GetCompressedAccountPostRequestParams { - GetCompressedAccountPostRequestParams { - address: None, - hash: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_200_response.rs deleted file mode 100644 index 1e969316a0..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedAccountProofPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedAccountProofPost200Response { - GetCompressedAccountProofPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_200_response_result.rs deleted file mode 100644 index 040ff082ff..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedAccountProofPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::GetCompressedAccountProofResponseValue, - ) -> GetCompressedAccountProofPost200ResponseResult { - GetCompressedAccountProofPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_request.rs deleted file mode 100644 index 68b06f0f8f..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedAccountProofPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountProofPostRequestParams, - ) -> GetCompressedAccountProofPostRequest { - GetCompressedAccountProofPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedAccountProof")] - GetCompressedAccountProof, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedAccountProof - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_request_params.rs deleted file mode 100644 index aea9392fce..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_request_params.rs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofPostRequestParams { - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "hash")] - pub hash: String, -} - -impl GetCompressedAccountProofPostRequestParams { - pub fn new(hash: String) -> GetCompressedAccountProofPostRequestParams { - GetCompressedAccountProofPostRequestParams { hash } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_200_response.rs deleted file mode 100644 index 1b8f770d7a..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedAccountProofV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedAccountProofV2Post200Response { - GetCompressedAccountProofV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_200_response_result.rs deleted file mode 100644 index 579b25d669..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedAccountProofV2Post200ResponseResult { - pub fn new( - context: models::Context, - value: models::GetCompressedAccountProofResponseValueV2, - ) -> GetCompressedAccountProofV2Post200ResponseResult { - GetCompressedAccountProofV2Post200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_request.rs deleted file mode 100644 index 1b5fc9e0f5..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_proof_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedAccountProofV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountProofPostRequestParams, - ) -> GetCompressedAccountProofV2PostRequest { - GetCompressedAccountProofV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedAccountProofV2")] - GetCompressedAccountProofV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedAccountProofV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_200_response.rs deleted file mode 100644 index 029f7ed01e..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedAccountV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedAccountV2Post200Response { - GetCompressedAccountV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_200_response_result.rs deleted file mode 100644 index 45c3074dd3..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_200_response_result.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option>, -} - -impl GetCompressedAccountV2Post200ResponseResult { - pub fn new(context: models::Context) -> GetCompressedAccountV2Post200ResponseResult { - GetCompressedAccountV2Post200ResponseResult { - context: Box::new(context), - value: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_request.rs deleted file mode 100644 index 0686798810..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_account_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedAccountV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountPostRequestParams, - ) -> GetCompressedAccountV2PostRequest { - GetCompressedAccountV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedAccountV2")] - GetCompressedAccountV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedAccountV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_200_response.rs deleted file mode 100644 index a3a9e99049..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountsByOwnerPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedAccountsByOwnerPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedAccountsByOwnerPost200Response { - GetCompressedAccountsByOwnerPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_200_response_result.rs deleted file mode 100644 index 7e0854a779..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountsByOwnerPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedAccountsByOwnerPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::PaginatedAccountList, - ) -> GetCompressedAccountsByOwnerPost200ResponseResult { - GetCompressedAccountsByOwnerPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_request.rs deleted file mode 100644 index bf86cdd3dc..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountsByOwnerPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedAccountsByOwnerPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountsByOwnerPostRequestParams, - ) -> GetCompressedAccountsByOwnerPostRequest { - GetCompressedAccountsByOwnerPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedAccountsByOwner")] - GetCompressedAccountsByOwner, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedAccountsByOwner - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_request_params.rs deleted file mode 100644 index e5115d705c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_post_request_params.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountsByOwnerPostRequestParams { - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "cursor", default, skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "dataSlice", default, skip_serializing_if = "Option::is_none")] - pub data_slice: Option>, - #[serde(rename = "filters", skip_serializing_if = "Option::is_none")] - pub filters: Option>, - #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")] - pub limit: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "owner")] - pub owner: String, -} - -impl GetCompressedAccountsByOwnerPostRequestParams { - pub fn new(owner: String) -> GetCompressedAccountsByOwnerPostRequestParams { - GetCompressedAccountsByOwnerPostRequestParams { - cursor: None, - data_slice: None, - filters: None, - limit: None, - owner, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_200_response.rs deleted file mode 100644 index 76a5305767..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountsByOwnerV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedAccountsByOwnerV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedAccountsByOwnerV2Post200Response { - GetCompressedAccountsByOwnerV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_200_response_result.rs deleted file mode 100644 index 8d81dc191e..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountsByOwnerV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedAccountsByOwnerV2Post200ResponseResult { - pub fn new( - context: models::Context, - value: models::PaginatedAccountListV2, - ) -> GetCompressedAccountsByOwnerV2Post200ResponseResult { - GetCompressedAccountsByOwnerV2Post200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_request.rs deleted file mode 100644 index 228740b690..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_accounts_by_owner_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountsByOwnerV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedAccountsByOwnerV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountsByOwnerPostRequestParams, - ) -> GetCompressedAccountsByOwnerV2PostRequest { - GetCompressedAccountsByOwnerV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedAccountsByOwnerV2")] - GetCompressedAccountsByOwnerV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedAccountsByOwnerV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_balance_by_owner_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_balance_by_owner_post_request.rs deleted file mode 100644 index 1bfac9656d..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_balance_by_owner_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedBalanceByOwnerPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedBalanceByOwnerPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedBalanceByOwnerPostRequestParams, - ) -> GetCompressedBalanceByOwnerPostRequest { - GetCompressedBalanceByOwnerPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedBalanceByOwner")] - GetCompressedBalanceByOwner, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedBalanceByOwner - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_balance_by_owner_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compressed_balance_by_owner_post_request_params.rs deleted file mode 100644 index bbb760af99..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_balance_by_owner_post_request_params.rs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedBalanceByOwnerPostRequestParams { - /// A Solana public key represented as a base58 string. - #[serde(rename = "owner")] - pub owner: String, -} - -impl GetCompressedBalanceByOwnerPostRequestParams { - pub fn new(owner: String) -> GetCompressedBalanceByOwnerPostRequestParams { - GetCompressedBalanceByOwnerPostRequestParams { owner } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_200_response.rs deleted file mode 100644 index 82937c6bcd..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedMintTokenHoldersPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedMintTokenHoldersPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedMintTokenHoldersPost200Response { - GetCompressedMintTokenHoldersPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_200_response_result.rs deleted file mode 100644 index 3c83b4f2ca..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedMintTokenHoldersPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedMintTokenHoldersPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::OwnerBalanceList, - ) -> GetCompressedMintTokenHoldersPost200ResponseResult { - GetCompressedMintTokenHoldersPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_request.rs deleted file mode 100644 index 0f3df37dc6..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedMintTokenHoldersPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedMintTokenHoldersPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedMintTokenHoldersPostRequestParams, - ) -> GetCompressedMintTokenHoldersPostRequest { - GetCompressedMintTokenHoldersPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedMintTokenHolders")] - GetCompressedMintTokenHolders, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedMintTokenHolders - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_request_params.rs deleted file mode 100644 index 656fd6432e..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_mint_token_holders_post_request_params.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedMintTokenHoldersPostRequestParams { - /// A base 58 encoded string. - #[serde(rename = "cursor", default, skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")] - pub limit: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "mint")] - pub mint: String, -} - -impl GetCompressedMintTokenHoldersPostRequestParams { - pub fn new(mint: String) -> GetCompressedMintTokenHoldersPostRequestParams { - GetCompressedMintTokenHoldersPostRequestParams { - cursor: None, - limit: None, - mint, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_200_response.rs deleted file mode 100644 index 3893e9fee1..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountBalancePost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedTokenAccountBalancePost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedTokenAccountBalancePost200Response { - GetCompressedTokenAccountBalancePost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_200_response_result.rs deleted file mode 100644 index 14d510e059..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountBalancePost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedTokenAccountBalancePost200ResponseResult { - pub fn new( - context: models::Context, - value: models::TokenAccountBalance, - ) -> GetCompressedTokenAccountBalancePost200ResponseResult { - GetCompressedTokenAccountBalancePost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_request.rs deleted file mode 100644 index 79056d0d8a..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_account_balance_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountBalancePostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedTokenAccountBalancePostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountPostRequestParams, - ) -> GetCompressedTokenAccountBalancePostRequest { - GetCompressedTokenAccountBalancePostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedTokenAccountBalance")] - GetCompressedTokenAccountBalance, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedTokenAccountBalance - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_200_response.rs deleted file mode 100644 index 4ac630e6af..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByDelegatePost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedTokenAccountsByDelegatePost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedTokenAccountsByDelegatePost200Response { - GetCompressedTokenAccountsByDelegatePost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_200_response_result.rs deleted file mode 100644 index 2c70df43be..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByDelegatePost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedTokenAccountsByDelegatePost200ResponseResult { - pub fn new( - context: models::Context, - value: models::TokenAccountList, - ) -> GetCompressedTokenAccountsByDelegatePost200ResponseResult { - GetCompressedTokenAccountsByDelegatePost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_request.rs deleted file mode 100644 index 3c4e1ff66e..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByDelegatePostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedTokenAccountsByDelegatePostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedTokenAccountsByDelegatePostRequestParams, - ) -> GetCompressedTokenAccountsByDelegatePostRequest { - GetCompressedTokenAccountsByDelegatePostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedTokenAccountsByDelegate")] - GetCompressedTokenAccountsByDelegate, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedTokenAccountsByDelegate - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_request_params.rs deleted file mode 100644 index c3dfa3ae27..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_post_request_params.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByDelegatePostRequestParams { - /// A base 58 encoded string. - #[serde(rename = "cursor", default, skip_serializing_if = "Option::is_none")] - pub cursor: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "delegate")] - pub delegate: String, - #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")] - pub limit: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "mint", default, skip_serializing_if = "Option::is_none")] - pub mint: Option, -} - -impl GetCompressedTokenAccountsByDelegatePostRequestParams { - pub fn new(delegate: String) -> GetCompressedTokenAccountsByDelegatePostRequestParams { - GetCompressedTokenAccountsByDelegatePostRequestParams { - cursor: None, - delegate, - limit: None, - mint: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_200_response.rs deleted file mode 100644 index 4cccbe9b12..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByDelegateV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedTokenAccountsByDelegateV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedTokenAccountsByDelegateV2Post200Response { - GetCompressedTokenAccountsByDelegateV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_200_response_result.rs deleted file mode 100644 index 64e07f6025..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByDelegateV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedTokenAccountsByDelegateV2Post200ResponseResult { - pub fn new( - context: models::Context, - value: models::TokenAccountListV2, - ) -> GetCompressedTokenAccountsByDelegateV2Post200ResponseResult { - GetCompressedTokenAccountsByDelegateV2Post200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_request.rs deleted file mode 100644 index 21a3aca37a..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_delegate_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByDelegateV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedTokenAccountsByDelegateV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedTokenAccountsByDelegatePostRequestParams, - ) -> GetCompressedTokenAccountsByDelegateV2PostRequest { - GetCompressedTokenAccountsByDelegateV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedTokenAccountsByDelegateV2")] - GetCompressedTokenAccountsByDelegateV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedTokenAccountsByDelegateV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_post_request.rs deleted file mode 100644 index 8af3280988..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByOwnerPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedTokenAccountsByOwnerPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedTokenAccountsByOwnerPostRequestParams, - ) -> GetCompressedTokenAccountsByOwnerPostRequest { - GetCompressedTokenAccountsByOwnerPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedTokenAccountsByOwner")] - GetCompressedTokenAccountsByOwner, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedTokenAccountsByOwner - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_post_request_params.rs deleted file mode 100644 index b474115429..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_post_request_params.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByOwnerPostRequestParams { - /// A base 58 encoded string. - #[serde(rename = "cursor", default, skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")] - pub limit: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "mint", default, skip_serializing_if = "Option::is_none")] - pub mint: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "owner")] - pub owner: String, -} - -impl GetCompressedTokenAccountsByOwnerPostRequestParams { - pub fn new(owner: String) -> GetCompressedTokenAccountsByOwnerPostRequestParams { - GetCompressedTokenAccountsByOwnerPostRequestParams { - cursor: None, - limit: None, - mint: None, - owner, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_v2_post_request.rs deleted file mode 100644 index bb81841c2f..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_accounts_by_owner_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenAccountsByOwnerV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedTokenAccountsByOwnerV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedTokenAccountsByOwnerPostRequestParams, - ) -> GetCompressedTokenAccountsByOwnerV2PostRequest { - GetCompressedTokenAccountsByOwnerV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedTokenAccountsByOwnerV2")] - GetCompressedTokenAccountsByOwnerV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedTokenAccountsByOwnerV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_200_response.rs deleted file mode 100644 index 9cc7930160..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenBalancesByOwnerPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedTokenBalancesByOwnerPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedTokenBalancesByOwnerPost200Response { - GetCompressedTokenBalancesByOwnerPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_200_response_result.rs deleted file mode 100644 index 6e8c1f2501..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenBalancesByOwnerPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedTokenBalancesByOwnerPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::TokenBalanceList, - ) -> GetCompressedTokenBalancesByOwnerPost200ResponseResult { - GetCompressedTokenBalancesByOwnerPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_request.rs deleted file mode 100644 index 9c8b4aeebb..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenBalancesByOwnerPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedTokenBalancesByOwnerPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedTokenAccountsByOwnerPostRequestParams, - ) -> GetCompressedTokenBalancesByOwnerPostRequest { - GetCompressedTokenBalancesByOwnerPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedTokenBalancesByOwner")] - GetCompressedTokenBalancesByOwner, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedTokenBalancesByOwner - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_200_response.rs deleted file mode 100644 index f9a7a15546..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenBalancesByOwnerV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressedTokenBalancesByOwnerV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressedTokenBalancesByOwnerV2Post200Response { - GetCompressedTokenBalancesByOwnerV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_200_response_result.rs deleted file mode 100644 index 09b44cd5dd..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenBalancesByOwnerV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressedTokenBalancesByOwnerV2Post200ResponseResult { - pub fn new( - context: models::Context, - value: models::TokenBalanceListV2, - ) -> GetCompressedTokenBalancesByOwnerV2Post200ResponseResult { - GetCompressedTokenBalancesByOwnerV2Post200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_request.rs deleted file mode 100644 index 9375101b02..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compressed_token_balances_by_owner_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedTokenBalancesByOwnerV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressedTokenBalancesByOwnerV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedTokenAccountsByOwnerPostRequestParams, - ) -> GetCompressedTokenBalancesByOwnerV2PostRequest { - GetCompressedTokenBalancesByOwnerV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressedTokenBalancesByOwnerV2")] - GetCompressedTokenBalancesByOwnerV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressedTokenBalancesByOwnerV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_200_response.rs deleted file mode 100644 index fb1902d26c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForAccountPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressionSignaturesForAccountPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressionSignaturesForAccountPost200Response { - GetCompressionSignaturesForAccountPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_200_response_result.rs deleted file mode 100644 index ba5cbee947..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForAccountPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressionSignaturesForAccountPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::SignatureInfoList, - ) -> GetCompressionSignaturesForAccountPost200ResponseResult { - GetCompressionSignaturesForAccountPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_request.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_request.rs deleted file mode 100644 index eacc193159..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_account_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForAccountPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressionSignaturesForAccountPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressedAccountProofPostRequestParams, - ) -> GetCompressionSignaturesForAccountPostRequest { - GetCompressionSignaturesForAccountPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressionSignaturesForAccount")] - GetCompressionSignaturesForAccount, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressionSignaturesForAccount - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_200_response.rs deleted file mode 100644 index b99893707f..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForAddressPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetCompressionSignaturesForAddressPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetCompressionSignaturesForAddressPost200Response { - GetCompressionSignaturesForAddressPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_200_response_result.rs deleted file mode 100644 index b3146ef38f..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForAddressPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetCompressionSignaturesForAddressPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::PaginatedSignatureInfoList, - ) -> GetCompressionSignaturesForAddressPost200ResponseResult { - GetCompressionSignaturesForAddressPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_request.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_request.rs deleted file mode 100644 index f709159cb1..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForAddressPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressionSignaturesForAddressPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressionSignaturesForAddressPostRequestParams, - ) -> GetCompressionSignaturesForAddressPostRequest { - GetCompressionSignaturesForAddressPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressionSignaturesForAddress")] - GetCompressionSignaturesForAddress, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressionSignaturesForAddress - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_request_params.rs deleted file mode 100644 index 27af5febea..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_address_post_request_params.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForAddressPostRequestParams { - /// A Solana public key represented as a base58 string. - #[serde(rename = "address")] - pub address: String, - #[serde(rename = "cursor", default, skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")] - pub limit: Option, -} - -impl GetCompressionSignaturesForAddressPostRequestParams { - pub fn new(address: String) -> GetCompressionSignaturesForAddressPostRequestParams { - GetCompressionSignaturesForAddressPostRequestParams { - address, - cursor: None, - limit: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_owner_post_request.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_owner_post_request.rs deleted file mode 100644 index 0ee487019d..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_owner_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForOwnerPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressionSignaturesForOwnerPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressionSignaturesForOwnerPostRequestParams, - ) -> GetCompressionSignaturesForOwnerPostRequest { - GetCompressionSignaturesForOwnerPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressionSignaturesForOwner")] - GetCompressionSignaturesForOwner, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressionSignaturesForOwner - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_owner_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_owner_post_request_params.rs deleted file mode 100644 index 6256c5c1de..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_owner_post_request_params.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForOwnerPostRequestParams { - #[serde(rename = "cursor", default, skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")] - pub limit: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "owner")] - pub owner: String, -} - -impl GetCompressionSignaturesForOwnerPostRequestParams { - pub fn new(owner: String) -> GetCompressionSignaturesForOwnerPostRequestParams { - GetCompressionSignaturesForOwnerPostRequestParams { - cursor: None, - limit: None, - owner, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_token_owner_post_request.rs b/sdk-libs/photon-api/src/models/_get_compression_signatures_for_token_owner_post_request.rs deleted file mode 100644 index cd289c654e..0000000000 --- a/sdk-libs/photon-api/src/models/_get_compression_signatures_for_token_owner_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressionSignaturesForTokenOwnerPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetCompressionSignaturesForTokenOwnerPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetCompressionSignaturesForOwnerPostRequestParams, - ) -> GetCompressionSignaturesForTokenOwnerPostRequest { - GetCompressionSignaturesForTokenOwnerPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getCompressionSignaturesForTokenOwner")] - GetCompressionSignaturesForTokenOwner, -} - -impl Default for Method { - fn default() -> Method { - Self::GetCompressionSignaturesForTokenOwner - } -} diff --git a/sdk-libs/photon-api/src/models/_get_indexer_health_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_indexer_health_post_200_response.rs deleted file mode 100644 index 91962e7a86..0000000000 --- a/sdk-libs/photon-api/src/models/_get_indexer_health_post_200_response.rs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetIndexerHealthPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// ok if healthy - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option, -} - -impl GetIndexerHealthPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetIndexerHealthPost200Response { - GetIndexerHealthPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// ok if healthy -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Result { - #[serde(rename = "ok")] - Ok, -} - -impl Default for Result { - fn default() -> Result { - Self::Ok - } -} diff --git a/sdk-libs/photon-api/src/models/_get_indexer_health_post_request.rs b/sdk-libs/photon-api/src/models/_get_indexer_health_post_request.rs deleted file mode 100644 index d54db0f3bb..0000000000 --- a/sdk-libs/photon-api/src/models/_get_indexer_health_post_request.rs +++ /dev/null @@ -1,70 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetIndexerHealthPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, -} - -impl GetIndexerHealthPostRequest { - pub fn new(id: Id, jsonrpc: Jsonrpc, method: Method) -> GetIndexerHealthPostRequest { - GetIndexerHealthPostRequest { - id, - jsonrpc, - method, - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getIndexerHealth")] - GetIndexerHealth, -} - -impl Default for Method { - fn default() -> Method { - Self::GetIndexerHealth - } -} diff --git a/sdk-libs/photon-api/src/models/_get_indexer_slot_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_indexer_slot_post_200_response.rs deleted file mode 100644 index 5f64da8df4..0000000000 --- a/sdk-libs/photon-api/src/models/_get_indexer_slot_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetIndexerSlotPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option, -} - -impl GetIndexerSlotPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetIndexerSlotPost200Response { - GetIndexerSlotPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_indexer_slot_post_request.rs b/sdk-libs/photon-api/src/models/_get_indexer_slot_post_request.rs deleted file mode 100644 index 2ffd023a8d..0000000000 --- a/sdk-libs/photon-api/src/models/_get_indexer_slot_post_request.rs +++ /dev/null @@ -1,70 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetIndexerSlotPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, -} - -impl GetIndexerSlotPostRequest { - pub fn new(id: Id, jsonrpc: Jsonrpc, method: Method) -> GetIndexerSlotPostRequest { - GetIndexerSlotPostRequest { - id, - jsonrpc, - method, - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getIndexerSlot")] - GetIndexerSlot, -} - -impl Default for Method { - fn default() -> Method { - Self::GetIndexerSlot - } -} diff --git a/sdk-libs/photon-api/src/models/_get_latest_compression_signatures_post_request.rs b/sdk-libs/photon-api/src/models/_get_latest_compression_signatures_post_request.rs deleted file mode 100644 index 603f913d57..0000000000 --- a/sdk-libs/photon-api/src/models/_get_latest_compression_signatures_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetLatestCompressionSignaturesPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetLatestCompressionSignaturesPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetLatestCompressionSignaturesPostRequestParams, - ) -> GetLatestCompressionSignaturesPostRequest { - GetLatestCompressionSignaturesPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getLatestCompressionSignatures")] - GetLatestCompressionSignatures, -} - -impl Default for Method { - fn default() -> Method { - Self::GetLatestCompressionSignatures - } -} diff --git a/sdk-libs/photon-api/src/models/_get_latest_compression_signatures_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_latest_compression_signatures_post_request_params.rs deleted file mode 100644 index e1c65b4726..0000000000 --- a/sdk-libs/photon-api/src/models/_get_latest_compression_signatures_post_request_params.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetLatestCompressionSignaturesPostRequestParams { - #[serde( - rename = "cursor", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub cursor: Option>, - #[serde( - rename = "limit", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub limit: Option>, -} - -impl GetLatestCompressionSignaturesPostRequestParams { - pub fn new() -> GetLatestCompressionSignaturesPostRequestParams { - GetLatestCompressionSignaturesPostRequestParams { - cursor: None, - limit: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_200_response.rs deleted file mode 100644 index f624823159..0000000000 --- a/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetLatestNonVotingSignaturesPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetLatestNonVotingSignaturesPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetLatestNonVotingSignaturesPost200Response { - GetLatestNonVotingSignaturesPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_200_response_result.rs deleted file mode 100644 index 4a9d502b2c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetLatestNonVotingSignaturesPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetLatestNonVotingSignaturesPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::SignatureInfoListWithError, - ) -> GetLatestNonVotingSignaturesPost200ResponseResult { - GetLatestNonVotingSignaturesPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_request.rs b/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_request.rs deleted file mode 100644 index ec4cff4d2b..0000000000 --- a/sdk-libs/photon-api/src/models/_get_latest_non_voting_signatures_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetLatestNonVotingSignaturesPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetLatestNonVotingSignaturesPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetLatestCompressionSignaturesPostRequestParams, - ) -> GetLatestNonVotingSignaturesPostRequest { - GetLatestNonVotingSignaturesPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getLatestNonVotingSignatures")] - GetLatestNonVotingSignatures, -} - -impl Default for Method { - fn default() -> Method { - Self::GetLatestNonVotingSignatures - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_200_response.rs deleted file mode 100644 index d46d97e6e7..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_200_response.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleAccountInterfacesPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: String, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetMultipleAccountInterfacesPost200Response { - pub fn new(id: String, jsonrpc: String) -> Self { - Self { - error: None, - id, - jsonrpc, - result: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_200_response_result.rs deleted file mode 100644 index 31085786eb..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_200_response_result.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleAccountInterfacesPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - /// List of typed results (Some for found accounts, None for not found) - #[serde(rename = "value")] - pub value: Vec>, -} - -impl GetMultipleAccountInterfacesPost200ResponseResult { - pub fn new(context: models::Context, value: Vec>) -> Self { - Self { - context: Box::new(context), - value, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_request.rs b/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_request.rs deleted file mode 100644 index fb9308c13b..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_request.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleAccountInterfacesPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: String, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: String, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetMultipleAccountInterfacesPostRequest { - pub fn new(params: models::GetMultipleAccountInterfacesPostRequestParams) -> Self { - Self { - id: "test-id".to_string(), - jsonrpc: "2.0".to_string(), - method: "getMultipleAccountInterfaces".to_string(), - params: Box::new(params), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_request_params.rs deleted file mode 100644 index c20d8b1e42..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_account_interfaces_post_request_params.rs +++ /dev/null @@ -1,22 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -/// GetMultipleAccountInterfacesPostRequestParams : Request parameters for getMultipleAccountInterfaces -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleAccountInterfacesPostRequestParams { - /// List of account addresses to look up (max 100) - #[serde(rename = "addresses")] - pub addresses: Vec, -} - -impl GetMultipleAccountInterfacesPostRequestParams { - pub fn new(addresses: Vec) -> Self { - Self { addresses } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_200_response.rs deleted file mode 100644 index e0b5f1b45c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountProofsPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetMultipleCompressedAccountProofsPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetMultipleCompressedAccountProofsPost200Response { - GetMultipleCompressedAccountProofsPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_200_response_result.rs deleted file mode 100644 index 45447d1772..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountProofsPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Vec, -} - -impl GetMultipleCompressedAccountProofsPost200ResponseResult { - pub fn new( - context: models::Context, - value: Vec, - ) -> GetMultipleCompressedAccountProofsPost200ResponseResult { - GetMultipleCompressedAccountProofsPost200ResponseResult { - context: Box::new(context), - value, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_request.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_request.rs deleted file mode 100644 index 2418e54337..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountProofsPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Vec, -} - -impl GetMultipleCompressedAccountProofsPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: Vec, - ) -> GetMultipleCompressedAccountProofsPostRequest { - GetMultipleCompressedAccountProofsPostRequest { - id, - jsonrpc, - method, - params, - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getMultipleCompressedAccountProofs")] - GetMultipleCompressedAccountProofs, -} - -impl Default for Method { - fn default() -> Method { - Self::GetMultipleCompressedAccountProofs - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_200_response.rs deleted file mode 100644 index 8c0f0d717e..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountProofsV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetMultipleCompressedAccountProofsV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetMultipleCompressedAccountProofsV2Post200Response { - GetMultipleCompressedAccountProofsV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_200_response_result.rs deleted file mode 100644 index 859d8931fa..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountProofsV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Vec, -} - -impl GetMultipleCompressedAccountProofsV2Post200ResponseResult { - pub fn new( - context: models::Context, - value: Vec, - ) -> GetMultipleCompressedAccountProofsV2Post200ResponseResult { - GetMultipleCompressedAccountProofsV2Post200ResponseResult { - context: Box::new(context), - value, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_request.rs deleted file mode 100644 index a2ba4a7f9c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_account_proofs_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountProofsV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Vec, -} - -impl GetMultipleCompressedAccountProofsV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: Vec, - ) -> GetMultipleCompressedAccountProofsV2PostRequest { - GetMultipleCompressedAccountProofsV2PostRequest { - id, - jsonrpc, - method, - params, - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getMultipleCompressedAccountProofsV2")] - GetMultipleCompressedAccountProofsV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetMultipleCompressedAccountProofsV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_200_response.rs deleted file mode 100644 index 9b0a05d21c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountsPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetMultipleCompressedAccountsPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetMultipleCompressedAccountsPost200Response { - GetMultipleCompressedAccountsPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_200_response_result.rs deleted file mode 100644 index 830f5a0c71..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountsPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetMultipleCompressedAccountsPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::AccountList, - ) -> GetMultipleCompressedAccountsPost200ResponseResult { - GetMultipleCompressedAccountsPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_request.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_request.rs deleted file mode 100644 index efe4ee8b62..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountsPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetMultipleCompressedAccountsPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetMultipleCompressedAccountsPostRequestParams, - ) -> GetMultipleCompressedAccountsPostRequest { - GetMultipleCompressedAccountsPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getMultipleCompressedAccounts")] - GetMultipleCompressedAccounts, -} - -impl Default for Method { - fn default() -> Method { - Self::GetMultipleCompressedAccounts - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_request_params.rs deleted file mode 100644 index da5a367efe..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_post_request_params.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -/// GetMultipleCompressedAccountsPostRequestParams : Request for compressed account data -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountsPostRequestParams { - #[serde(rename = "addresses", default, skip_serializing_if = "Option::is_none")] - pub addresses: Option>, - #[serde(rename = "hashes", default, skip_serializing_if = "Option::is_none")] - pub hashes: Option>, -} - -impl GetMultipleCompressedAccountsPostRequestParams { - /// Request for compressed account data - pub fn new() -> GetMultipleCompressedAccountsPostRequestParams { - GetMultipleCompressedAccountsPostRequestParams { - addresses: None, - hashes: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_200_response.rs deleted file mode 100644 index b115da16a5..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountsV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetMultipleCompressedAccountsV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetMultipleCompressedAccountsV2Post200Response { - GetMultipleCompressedAccountsV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_200_response_result.rs deleted file mode 100644 index fed208bc7a..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountsV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetMultipleCompressedAccountsV2Post200ResponseResult { - pub fn new( - context: models::Context, - value: models::AccountListV2, - ) -> GetMultipleCompressedAccountsV2Post200ResponseResult { - GetMultipleCompressedAccountsV2Post200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_request.rs deleted file mode 100644 index 66e0e28004..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountsV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetMultipleCompressedAccountsV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetMultipleCompressedAccountsV2PostRequestParams, - ) -> GetMultipleCompressedAccountsV2PostRequest { - GetMultipleCompressedAccountsV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getMultipleCompressedAccountsV2")] - GetMultipleCompressedAccountsV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetMultipleCompressedAccountsV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_request_params.rs deleted file mode 100644 index ec6d5fe5f8..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_compressed_accounts_v2_post_request_params.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -/// GetMultipleCompressedAccountsV2PostRequestParams : Request for compressed account data -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleCompressedAccountsV2PostRequestParams { - #[serde(rename = "addresses", default, skip_serializing_if = "Option::is_none")] - pub addresses: Option>, - #[serde(rename = "hashes", default, skip_serializing_if = "Option::is_none")] - pub hashes: Option>, -} - -impl GetMultipleCompressedAccountsV2PostRequestParams { - /// Request for compressed account data - pub fn new() -> GetMultipleCompressedAccountsV2PostRequestParams { - GetMultipleCompressedAccountsV2PostRequestParams { - addresses: None, - hashes: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_200_response.rs deleted file mode 100644 index eb0f18d606..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleNewAddressProofsPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetMultipleNewAddressProofsPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetMultipleNewAddressProofsPost200Response { - GetMultipleNewAddressProofsPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_200_response_result.rs deleted file mode 100644 index 6bbc5c8ed4..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleNewAddressProofsPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Vec, -} - -impl GetMultipleNewAddressProofsPost200ResponseResult { - pub fn new( - context: models::Context, - value: Vec, - ) -> GetMultipleNewAddressProofsPost200ResponseResult { - GetMultipleNewAddressProofsPost200ResponseResult { - context: Box::new(context), - value, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_request.rs b/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_request.rs deleted file mode 100644 index efa99b2d3c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleNewAddressProofsPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Vec, -} - -impl GetMultipleNewAddressProofsPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: Vec, - ) -> GetMultipleNewAddressProofsPostRequest { - GetMultipleNewAddressProofsPostRequest { - id, - jsonrpc, - method, - params, - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getMultipleNewAddressProofs")] - GetMultipleNewAddressProofs, -} - -impl Default for Method { - fn default() -> Method { - Self::GetMultipleNewAddressProofs - } -} diff --git a/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_v2_post_request.rs deleted file mode 100644 index 2f2237e335..0000000000 --- a/sdk-libs/photon-api/src/models/_get_multiple_new_address_proofs_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetMultipleNewAddressProofsV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Vec, -} - -impl GetMultipleNewAddressProofsV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: Vec, - ) -> GetMultipleNewAddressProofsV2PostRequest { - GetMultipleNewAddressProofsV2PostRequest { - id, - jsonrpc, - method, - params, - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getMultipleNewAddressProofsV2")] - GetMultipleNewAddressProofsV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetMultipleNewAddressProofsV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_elements_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_queue_elements_post_200_response.rs deleted file mode 100644 index c958130397..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_elements_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueElementsPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetQueueElementsPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetQueueElementsPost200Response { - GetQueueElementsPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_elements_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_queue_elements_post_200_response_result.rs deleted file mode 100644 index 6b43e56c0c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_elements_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueElementsPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "stateQueue", skip_serializing_if = "Option::is_none")] - pub state_queue: Option>, - #[serde(rename = "addressQueue", skip_serializing_if = "Option::is_none")] - pub address_queue: Option>, -} - -impl GetQueueElementsPost200ResponseResult { - pub fn new(context: models::Context) -> GetQueueElementsPost200ResponseResult { - GetQueueElementsPost200ResponseResult { - context: Box::new(context), - state_queue: None, - address_queue: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_elements_post_request.rs b/sdk-libs/photon-api/src/models/_get_queue_elements_post_request.rs deleted file mode 100644 index 4761452303..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_elements_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueElementsPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetQueueElementsPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetQueueElementsPostRequestParams, - ) -> GetQueueElementsPostRequest { - GetQueueElementsPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getQueueElements")] - GetQueueElements, -} - -impl Default for Method { - fn default() -> Method { - Self::GetQueueElements - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_elements_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_queue_elements_post_request_params.rs deleted file mode 100644 index b2998b6fc0..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_elements_post_request_params.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct GetQueueElementsPostRequestParams { - /// The merkle tree public key - pub tree: String, - - #[serde(skip_serializing_if = "Option::is_none")] - pub output_queue: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub input_queue: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub address_queue: Option, -} - -impl GetQueueElementsPostRequestParams { - pub fn new(tree: String) -> GetQueueElementsPostRequestParams { - GetQueueElementsPostRequestParams { - tree, - output_queue: None, - input_queue: None, - address_queue: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_200_response.rs deleted file mode 100644 index 13441587c3..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueElementsV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetQueueElementsV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetQueueElementsV2Post200Response { - GetQueueElementsV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_200_response_result.rs deleted file mode 100644 index 34b395e7e8..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueElementsV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "stateQueue", skip_serializing_if = "Option::is_none")] - pub state_queue: Option>, - #[serde(rename = "addressQueue", skip_serializing_if = "Option::is_none")] - pub address_queue: Option>, -} - -impl GetQueueElementsV2Post200ResponseResult { - pub fn new(context: models::Context) -> GetQueueElementsV2Post200ResponseResult { - GetQueueElementsV2Post200ResponseResult { - context: Box::new(context), - state_queue: None, - address_queue: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_request.rs deleted file mode 100644 index 9adc582be7..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueElementsV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetQueueElementsV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetQueueElementsV2PostRequestParams, - ) -> GetQueueElementsV2PostRequest { - GetQueueElementsV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getQueueElements")] - GetQueueElementsV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetQueueElementsV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_request_params.rs deleted file mode 100644 index 36ffe2cbbf..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_elements_v2_post_request_params.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct GetQueueElementsV2PostRequestParams { - /// The merkle tree public key - pub tree: String, - - #[serde(skip_serializing_if = "Option::is_none")] - pub output_queue: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub input_queue: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub address_queue: Option, -} - -impl GetQueueElementsV2PostRequestParams { - pub fn new(tree: String) -> GetQueueElementsV2PostRequestParams { - GetQueueElementsV2PostRequestParams { - tree, - output_queue: None, - input_queue: None, - address_queue: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_info_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_queue_info_post_200_response.rs deleted file mode 100644 index 101456b52e..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_info_post_200_response.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct JsonRpcError { - pub code: i32, - pub message: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub data: Option, -} - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct GetQueueInfoPost200Response { - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option, - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option, - #[serde(rename = "id")] - pub id: Option, -} - -impl GetQueueInfoPost200Response { - pub fn new( - jsonrpc: String, - result: Option, - id: Option, - ) -> GetQueueInfoPost200Response { - GetQueueInfoPost200Response { - jsonrpc, - result, - error: None, - id, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_info_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_queue_info_post_200_response_result.rs deleted file mode 100644 index 00435c3aaa..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_info_post_200_response_result.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct GetQueueInfoPost200ResponseResult { - #[serde(rename = "queues")] - pub queues: Vec, - #[serde(rename = "slot")] - pub slot: u64, -} - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct QueueInfo { - #[serde(rename = "tree")] - pub tree: String, - #[serde(rename = "queue")] - pub queue: String, - #[serde(rename = "queueType")] - pub queue_type: u8, - #[serde(rename = "queueSize")] - pub queue_size: u64, -} - -impl GetQueueInfoPost200ResponseResult { - pub fn new(queues: Vec, slot: u64) -> GetQueueInfoPost200ResponseResult { - GetQueueInfoPost200ResponseResult { queues, slot } - } -} - -impl QueueInfo { - pub fn new(tree: String, queue: String, queue_type: u8, queue_size: u64) -> QueueInfo { - QueueInfo { - tree, - queue, - queue_type, - queue_size, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_queue_info_post_request.rs b/sdk-libs/photon-api/src/models/_get_queue_info_post_request.rs deleted file mode 100644 index 29511189a3..0000000000 --- a/sdk-libs/photon-api/src/models/_get_queue_info_post_request.rs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueInfoPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: i32, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: GetQueueInfoParams, -} - -impl GetQueueInfoPostRequest { - pub fn new(id: i32, jsonrpc: Jsonrpc, method: Method) -> GetQueueInfoPostRequest { - GetQueueInfoPostRequest { - id, - jsonrpc, - method, - params: GetQueueInfoParams::default(), - } - } -} - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueInfoParams {} - -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} - -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getQueueInfo")] - GetQueueInfo, -} - -impl Default for Method { - fn default() -> Method { - Self::GetQueueInfo - } -} diff --git a/sdk-libs/photon-api/src/models/_get_token_account_interface_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_token_account_interface_post_200_response.rs deleted file mode 100644 index 7bd42eb7f7..0000000000 --- a/sdk-libs/photon-api/src/models/_get_token_account_interface_post_200_response.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTokenAccountInterfacePost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: String, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetTokenAccountInterfacePost200Response { - pub fn new(id: String, jsonrpc: String) -> Self { - Self { - error: None, - id, - jsonrpc, - result: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_token_account_interface_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_token_account_interface_post_200_response_result.rs deleted file mode 100644 index dadd19b281..0000000000 --- a/sdk-libs/photon-api/src/models/_get_token_account_interface_post_200_response_result.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTokenAccountInterfacePost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option>, -} - -impl GetTokenAccountInterfacePost200ResponseResult { - pub fn new(context: models::Context) -> Self { - Self { - context: Box::new(context), - value: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_token_account_interface_post_request.rs b/sdk-libs/photon-api/src/models/_get_token_account_interface_post_request.rs deleted file mode 100644 index 8255ac11f7..0000000000 --- a/sdk-libs/photon-api/src/models/_get_token_account_interface_post_request.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTokenAccountInterfacePostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: String, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: String, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: String, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetTokenAccountInterfacePostRequest { - pub fn new(params: models::GetTokenAccountInterfacePostRequestParams) -> Self { - Self { - id: "test-id".to_string(), - jsonrpc: "2.0".to_string(), - method: "getTokenAccountInterface".to_string(), - params: Box::new(params), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_token_account_interface_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_token_account_interface_post_request_params.rs deleted file mode 100644 index 60f583e6af..0000000000 --- a/sdk-libs/photon-api/src/models/_get_token_account_interface_post_request_params.rs +++ /dev/null @@ -1,22 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -/// GetTokenAccountInterfacePostRequestParams : Request parameters for getTokenAccountInterface -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTokenAccountInterfacePostRequestParams { - /// Token account address to look up - #[serde(rename = "address")] - pub address: String, -} - -impl GetTokenAccountInterfacePostRequestParams { - pub fn new(address: String) -> Self { - Self { address } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response.rs deleted file mode 100644 index 0904505c21..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetTransactionWithCompressionInfoPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetTransactionWithCompressionInfoPost200Response { - GetTransactionWithCompressionInfoPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response_result.rs deleted file mode 100644 index 0eeb015b14..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response_result.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -/// GetTransactionWithCompressionInfoPost200ResponseResult : A Solana transaction with additional compression information -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoPost200ResponseResult { - #[serde(rename = "compression_info", skip_serializing_if = "Option::is_none")] - pub compression_info: - Option>, - /// An encoded confirmed transaction with status meta - #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] - pub transaction: Option, -} - -impl GetTransactionWithCompressionInfoPost200ResponseResult { - /// A Solana transaction with additional compression information - pub fn new() -> GetTransactionWithCompressionInfoPost200ResponseResult { - GetTransactionWithCompressionInfoPost200ResponseResult { - compression_info: None, - transaction: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response_result_compression_info.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response_result_compression_info.rs deleted file mode 100644 index e3a7131fd4..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_200_response_result_compression_info.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo { - #[serde(rename = "closedAccounts")] - pub closed_accounts: Vec, - #[serde(rename = "openedAccounts")] - pub opened_accounts: Vec, -} - -impl GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo { - pub fn new( - closed_accounts: Vec, - opened_accounts: Vec, - ) -> GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo { - GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo { - closed_accounts, - opened_accounts, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_request.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_request.rs deleted file mode 100644 index 2fda92692c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetTransactionWithCompressionInfoPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetTransactionWithCompressionInfoPostRequestParams, - ) -> GetTransactionWithCompressionInfoPostRequest { - GetTransactionWithCompressionInfoPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getTransactionWithCompressionInfo")] - GetTransactionWithCompressionInfo, -} - -impl Default for Method { - fn default() -> Method { - Self::GetTransactionWithCompressionInfo - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_request_params.rs deleted file mode 100644 index 3b7c6af52c..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_post_request_params.rs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoPostRequestParams { - /// A Solana transaction signature. - #[serde(rename = "signature")] - pub signature: String, -} - -impl GetTransactionWithCompressionInfoPostRequestParams { - pub fn new(signature: String) -> GetTransactionWithCompressionInfoPostRequestParams { - GetTransactionWithCompressionInfoPostRequestParams { signature } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response.rs deleted file mode 100644 index 677aa9e40b..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetTransactionWithCompressionInfoV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetTransactionWithCompressionInfoV2Post200Response { - GetTransactionWithCompressionInfoV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response_result.rs deleted file mode 100644 index 5cdb4df278..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response_result.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -/// GetTransactionWithCompressionInfoV2Post200ResponseResult : A Solana transaction with additional compression information -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoV2Post200ResponseResult { - #[serde(rename = "compression_info", skip_serializing_if = "Option::is_none")] - pub compression_info: Option< - Box, - >, - /// An encoded confirmed transaction with status meta - #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] - pub transaction: Option, -} - -impl GetTransactionWithCompressionInfoV2Post200ResponseResult { - /// A Solana transaction with additional compression information - pub fn new() -> GetTransactionWithCompressionInfoV2Post200ResponseResult { - GetTransactionWithCompressionInfoV2Post200ResponseResult { - compression_info: None, - transaction: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response_result_compression_info.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response_result_compression_info.rs deleted file mode 100644 index 6c8a895894..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_200_response_result_compression_info.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo { - #[serde(rename = "closedAccounts")] - pub closed_accounts: Vec, - #[serde(rename = "openedAccounts")] - pub opened_accounts: Vec, -} - -impl GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo { - pub fn new( - closed_accounts: Vec, - opened_accounts: Vec, - ) -> GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo { - GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo { - closed_accounts, - opened_accounts, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_request.rs deleted file mode 100644 index e1c961f3ab..0000000000 --- a/sdk-libs/photon-api/src/models/_get_transaction_with_compression_info_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetTransactionWithCompressionInfoV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetTransactionWithCompressionInfoV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetTransactionWithCompressionInfoPostRequestParams, - ) -> GetTransactionWithCompressionInfoV2PostRequest { - GetTransactionWithCompressionInfoV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getTransactionWithCompressionInfoV2")] - GetTransactionWithCompressionInfoV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetTransactionWithCompressionInfoV2 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_validity_proof_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_validity_proof_post_200_response.rs deleted file mode 100644 index 808e3523f3..0000000000 --- a/sdk-libs/photon-api/src/models/_get_validity_proof_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetValidityProofPost200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetValidityProofPost200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetValidityProofPost200Response { - GetValidityProofPost200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_validity_proof_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_validity_proof_post_200_response_result.rs deleted file mode 100644 index b264be70be..0000000000 --- a/sdk-libs/photon-api/src/models/_get_validity_proof_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetValidityProofPost200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetValidityProofPost200ResponseResult { - pub fn new( - context: models::Context, - value: models::CompressedProofWithContext, - ) -> GetValidityProofPost200ResponseResult { - GetValidityProofPost200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_validity_proof_post_request.rs b/sdk-libs/photon-api/src/models/_get_validity_proof_post_request.rs deleted file mode 100644 index c67dc7b6d0..0000000000 --- a/sdk-libs/photon-api/src/models/_get_validity_proof_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetValidityProofPostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetValidityProofPostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetValidityProofPostRequestParams, - ) -> GetValidityProofPostRequest { - GetValidityProofPostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getValidityProof")] - GetValidityProof, -} - -impl Default for Method { - fn default() -> Method { - Self::GetValidityProof - } -} diff --git a/sdk-libs/photon-api/src/models/_get_validity_proof_post_request_params.rs b/sdk-libs/photon-api/src/models/_get_validity_proof_post_request_params.rs deleted file mode 100644 index 3b303d9e47..0000000000 --- a/sdk-libs/photon-api/src/models/_get_validity_proof_post_request_params.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetValidityProofPostRequestParams { - #[serde(rename = "hashes", skip_serializing_if = "Option::is_none")] - pub hashes: Option>, - #[serde( - rename = "newAddressesWithTrees", - skip_serializing_if = "Option::is_none" - )] - pub new_addresses_with_trees: Option>, -} - -impl GetValidityProofPostRequestParams { - pub fn new() -> GetValidityProofPostRequestParams { - GetValidityProofPostRequestParams { - hashes: None, - new_addresses_with_trees: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_200_response.rs b/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_200_response.rs deleted file mode 100644 index 020ffe93dd..0000000000 --- a/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_200_response.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetValidityProofV2Post200Response { - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option>, - /// An ID to identify the response. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - #[serde(rename = "result", skip_serializing_if = "Option::is_none")] - pub result: Option>, -} - -impl GetValidityProofV2Post200Response { - pub fn new(id: Id, jsonrpc: Jsonrpc) -> GetValidityProofV2Post200Response { - GetValidityProofV2Post200Response { - error: None, - id, - jsonrpc, - result: None, - } - } -} -/// An ID to identify the response. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} diff --git a/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_200_response_result.rs b/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_200_response_result.rs deleted file mode 100644 index 6d49c97810..0000000000 --- a/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_200_response_result.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetValidityProofV2Post200ResponseResult { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl GetValidityProofV2Post200ResponseResult { - pub fn new( - context: models::Context, - value: models::CompressedProofWithContextV2, - ) -> GetValidityProofV2Post200ResponseResult { - GetValidityProofV2Post200ResponseResult { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_request.rs b/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_request.rs deleted file mode 100644 index c08be7a3ba..0000000000 --- a/sdk-libs/photon-api/src/models/_get_validity_proof_v2_post_request.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetValidityProofV2PostRequest { - /// An ID to identify the request. - #[serde(rename = "id")] - pub id: Id, - /// The version of the JSON-RPC protocol. - #[serde(rename = "jsonrpc")] - pub jsonrpc: Jsonrpc, - /// The name of the method to invoke. - #[serde(rename = "method")] - pub method: Method, - #[serde(rename = "params")] - pub params: Box, -} - -impl GetValidityProofV2PostRequest { - pub fn new( - id: Id, - jsonrpc: Jsonrpc, - method: Method, - params: models::GetValidityProofPostRequestParams, - ) -> GetValidityProofV2PostRequest { - GetValidityProofV2PostRequest { - id, - jsonrpc, - method, - params: Box::new(params), - } - } -} -/// An ID to identify the request. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Id { - #[serde(rename = "test-account")] - TestAccount, -} - -impl Default for Id { - fn default() -> Id { - Self::TestAccount - } -} -/// The version of the JSON-RPC protocol. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Jsonrpc { - #[serde(rename = "2.0")] - Variant2Period0, -} - -impl Default for Jsonrpc { - fn default() -> Jsonrpc { - Self::Variant2Period0 - } -} -/// The name of the method to invoke. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Method { - #[serde(rename = "getValidityProofV2")] - GetValidityProofV2, -} - -impl Default for Method { - fn default() -> Method { - Self::GetValidityProofV2 - } -} diff --git a/sdk-libs/photon-api/src/models/account.rs b/sdk-libs/photon-api/src/models/account.rs deleted file mode 100644 index c35b077ae7..0000000000 --- a/sdk-libs/photon-api/src/models/account.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Account { - /// A Solana public key represented as a base58 string. - #[serde(rename = "address", skip_serializing_if = "Option::is_none")] - pub address: Option, - #[serde(rename = "data", skip_serializing_if = "Option::is_none")] - pub data: Option>, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "hash")] - pub hash: String, - #[serde(rename = "lamports")] - pub lamports: u64, - #[serde(rename = "leafIndex")] - pub leaf_index: u32, - /// A Solana public key represented as a base58 string. - #[serde(rename = "owner")] - pub owner: String, - #[serde(rename = "seq", skip_serializing_if = "Option::is_none")] - pub seq: Option, - #[serde(rename = "slotCreated")] - pub slot_created: u64, - /// A Solana public key represented as a base58 string. - #[serde(rename = "tree")] - pub tree: String, -} - -impl Account { - pub fn new( - hash: String, - lamports: u64, - leaf_index: u32, - owner: String, - slot_created: u64, - tree: String, - ) -> Account { - Account { - address: None, - data: None, - hash, - lamports, - leaf_index, - owner, - seq: None, - slot_created, - tree, - } - } -} diff --git a/sdk-libs/photon-api/src/models/account_context.rs b/sdk-libs/photon-api/src/models/account_context.rs deleted file mode 100644 index b8cc31ca2a..0000000000 --- a/sdk-libs/photon-api/src/models/account_context.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -/// AccountContext: This is currently used internally: - Internal (state_updates,..) - GetTransactionWithCompressionInfo (internally) - GetTransactionWithCompressionInfoV2 (internally) All endpoints return AccountV2. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountContext { - #[serde(rename = "inOutputQueue")] - pub in_output_queue: bool, - #[serde(rename = "nullifiedInTree")] - pub nullified_in_tree: bool, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "nullifier", skip_serializing_if = "Option::is_none")] - pub nullifier: Option, - #[serde( - rename = "nullifierQueueIndex", - skip_serializing_if = "Option::is_none" - )] - pub nullifier_queue_index: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "queue")] - pub queue: String, - #[serde(rename = "spent")] - pub spent: bool, - #[serde(rename = "treeType")] - pub tree_type: u16, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "txHash", skip_serializing_if = "Option::is_none")] - pub tx_hash: Option, -} - -impl AccountContext { - /// This is currently used internally: - Internal (state_updates,..) - GetTransactionWithCompressionInfo (internally) - GetTransactionWithCompressionInfoV2 (internally) All endpoints return AccountV2. - pub fn new( - in_output_queue: bool, - nullified_in_tree: bool, - queue: String, - spent: bool, - tree_type: u16, - ) -> AccountContext { - AccountContext { - in_output_queue, - nullified_in_tree, - nullifier: None, - nullifier_queue_index: None, - queue, - spent, - tree_type, - tx_hash: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/account_data.rs b/sdk-libs/photon-api/src/models/account_data.rs deleted file mode 100644 index c6c683dfcd..0000000000 --- a/sdk-libs/photon-api/src/models/account_data.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountData { - /// A base 64 encoded string. - #[serde(rename = "data")] - pub data: String, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "dataHash")] - pub data_hash: String, - #[serde(rename = "discriminator")] - pub discriminator: u64, -} - -impl AccountData { - pub fn new(data: String, data_hash: String, discriminator: u64) -> AccountData { - AccountData { - data, - data_hash, - discriminator, - } - } -} diff --git a/sdk-libs/photon-api/src/models/account_interface.rs b/sdk-libs/photon-api/src/models/account_interface.rs deleted file mode 100644 index efae2f6498..0000000000 --- a/sdk-libs/photon-api/src/models/account_interface.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.51.0 - * - */ - -use crate::models; - -/// AccountInterface : Unified account interface — works for both on-chain and compressed accounts -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct AccountInterface { - /// The on-chain Solana pubkey - #[serde(rename = "key")] - pub key: String, - /// Standard Solana account fields - #[serde(rename = "account")] - pub account: models::SolanaAccountData, - /// Compressed context — null if on-chain, present if compressed - #[serde(rename = "cold", skip_serializing_if = "Option::is_none")] - pub cold: Option, -} - -impl AccountInterface { - pub fn new(key: String, account: models::SolanaAccountData) -> Self { - Self { - key, - account, - cold: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/account_list.rs b/sdk-libs/photon-api/src/models/account_list.rs deleted file mode 100644 index c2b45d9524..0000000000 --- a/sdk-libs/photon-api/src/models/account_list.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountList { - #[serde(rename = "items")] - pub items: Vec>, -} - -impl AccountList { - pub fn new(items: Vec>) -> AccountList { - AccountList { items } - } -} diff --git a/sdk-libs/photon-api/src/models/account_list_v2.rs b/sdk-libs/photon-api/src/models/account_list_v2.rs deleted file mode 100644 index 1ce046e6dd..0000000000 --- a/sdk-libs/photon-api/src/models/account_list_v2.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountListV2 { - #[serde(rename = "items")] - pub items: Vec, -} - -impl AccountListV2 { - pub fn new(items: Vec) -> AccountListV2 { - AccountListV2 { items } - } -} diff --git a/sdk-libs/photon-api/src/models/account_proof_inputs.rs b/sdk-libs/photon-api/src/models/account_proof_inputs.rs deleted file mode 100644 index 1950ea015d..0000000000 --- a/sdk-libs/photon-api/src/models/account_proof_inputs.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountProofInputs { - #[serde(rename = "hash")] - pub hash: String, - #[serde(rename = "leafIndex")] - pub leaf_index: u64, - #[serde(rename = "merkleContext")] - pub merkle_context: Box, - #[serde(rename = "root")] - pub root: String, - #[serde(rename = "rootIndex")] - pub root_index: Box, -} - -impl AccountProofInputs { - pub fn new( - hash: String, - leaf_index: u64, - merkle_context: models::MerkleContextV2, - root: String, - root_index: models::RootIndex, - ) -> AccountProofInputs { - AccountProofInputs { - hash, - leaf_index, - merkle_context: Box::new(merkle_context), - root, - root_index: Box::new(root_index), - } - } -} diff --git a/sdk-libs/photon-api/src/models/account_state.rs b/sdk-libs/photon-api/src/models/account_state.rs deleted file mode 100644 index 3f053ac56a..0000000000 --- a/sdk-libs/photon-api/src/models/account_state.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ -use std::fmt::Display; - -use crate::models; - -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum AccountState { - #[serde(rename = "initialized")] - Initialized, - #[serde(rename = "frozen")] - Frozen, -} - -impl Display for AccountState { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let str = match self { - Self::Initialized => String::from("initialized"), - Self::Frozen => String::from("frozen"), - }; - write!(f, "{}", str) - } -} - -impl Default for AccountState { - fn default() -> AccountState { - Self::Initialized - } -} diff --git a/sdk-libs/photon-api/src/models/account_v2.rs b/sdk-libs/photon-api/src/models/account_v2.rs deleted file mode 100644 index 31159f8c67..0000000000 --- a/sdk-libs/photon-api/src/models/account_v2.rs +++ /dev/null @@ -1,63 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountV2 { - /// A Solana public key represented as a base58 string. - #[serde(rename = "address", skip_serializing_if = "Option::is_none")] - pub address: Option, - #[serde(rename = "data", skip_serializing_if = "Option::is_none")] - pub data: Option>, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "hash")] - pub hash: String, - #[serde(rename = "lamports")] - pub lamports: u64, - #[serde(rename = "leafIndex")] - pub leaf_index: u32, - #[serde(rename = "merkleContext")] - pub merkle_context: Box, - /// A Solana public key represented as a base58 string. - #[serde(rename = "owner")] - pub owner: String, - #[serde(rename = "proveByIndex")] - pub prove_by_index: bool, - #[serde(rename = "seq", skip_serializing_if = "Option::is_none")] - pub seq: Option, - #[serde(rename = "slotCreated")] - pub slot_created: u64, -} - -impl AccountV2 { - pub fn new( - hash: String, - lamports: u64, - leaf_index: u32, - merkle_context: models::MerkleContextV2, - owner: String, - prove_by_index: bool, - slot_created: u64, - ) -> AccountV2 { - AccountV2 { - address: None, - data: None, - hash, - lamports, - leaf_index, - merkle_context: Box::new(merkle_context), - owner, - prove_by_index, - seq: None, - slot_created, - } - } -} diff --git a/sdk-libs/photon-api/src/models/account_with_context.rs b/sdk-libs/photon-api/src/models/account_with_context.rs deleted file mode 100644 index 1e31e17f44..0000000000 --- a/sdk-libs/photon-api/src/models/account_with_context.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountWithContext { - #[serde(rename = "account")] - pub account: Box, - #[serde(rename = "context")] - pub context: Box, -} - -impl AccountWithContext { - pub fn new(account: models::Account, context: models::AccountContext) -> AccountWithContext { - AccountWithContext { - account: Box::new(account), - context: Box::new(context), - } - } -} diff --git a/sdk-libs/photon-api/src/models/account_with_optional_token_data.rs b/sdk-libs/photon-api/src/models/account_with_optional_token_data.rs deleted file mode 100644 index 0662fb0a38..0000000000 --- a/sdk-libs/photon-api/src/models/account_with_optional_token_data.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountWithOptionalTokenData { - #[serde(rename = "account")] - pub account: Box, - #[serde(rename = "optionalTokenData", skip_serializing_if = "Option::is_none")] - pub optional_token_data: Option>, -} - -impl AccountWithOptionalTokenData { - pub fn new(account: models::Account) -> AccountWithOptionalTokenData { - AccountWithOptionalTokenData { - account: Box::new(account), - optional_token_data: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/account_with_optional_token_data_v2.rs b/sdk-libs/photon-api/src/models/account_with_optional_token_data_v2.rs deleted file mode 100644 index 8c0b00309f..0000000000 --- a/sdk-libs/photon-api/src/models/account_with_optional_token_data_v2.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountWithOptionalTokenDataV2 { - #[serde(rename = "account")] - pub account: Box, - #[serde(rename = "optionalTokenData", skip_serializing_if = "Option::is_none")] - pub optional_token_data: Option>, -} - -impl AccountWithOptionalTokenDataV2 { - pub fn new(account: models::AccountV2) -> AccountWithOptionalTokenDataV2 { - AccountWithOptionalTokenDataV2 { - account: Box::new(account), - optional_token_data: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/address_proof_inputs.rs b/sdk-libs/photon-api/src/models/address_proof_inputs.rs deleted file mode 100644 index eaf6f424aa..0000000000 --- a/sdk-libs/photon-api/src/models/address_proof_inputs.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AddressProofInputs { - #[serde(rename = "address")] - pub address: String, - #[serde(rename = "merkleContext")] - pub merkle_context: Box, - #[serde(rename = "root")] - pub root: String, - #[serde(rename = "rootIndex")] - pub root_index: u16, -} - -impl AddressProofInputs { - pub fn new( - address: String, - merkle_context: models::MerkleContextV2, - root: String, - root_index: u16, - ) -> AddressProofInputs { - AddressProofInputs { - address, - merkle_context: Box::new(merkle_context), - root, - root_index, - } - } -} diff --git a/sdk-libs/photon-api/src/models/address_queue_data_v2.rs b/sdk-libs/photon-api/src/models/address_queue_data_v2.rs deleted file mode 100644 index e4ba4239ca..0000000000 --- a/sdk-libs/photon-api/src/models/address_queue_data_v2.rs +++ /dev/null @@ -1,63 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[allow(clippy::too_many_arguments)] -pub struct AddressQueueDataV2 { - pub addresses: Vec, - pub queue_indices: Vec, - /// Deduplicated tree nodes for address tree non-inclusion proofs - pub nodes: Vec, - pub low_element_indices: Vec, - pub low_element_values: Vec, - pub low_element_next_indices: Vec, - pub low_element_next_values: Vec, - pub leaves_hash_chains: Vec, - pub initial_root: String, - pub start_index: u64, - pub subtrees: Vec, - pub root_seq: u64, -} - -impl AddressQueueDataV2 { - #[allow(clippy::too_many_arguments)] - pub fn new( - addresses: Vec, - queue_indices: Vec, - nodes: Vec, - low_element_indices: Vec, - low_element_values: Vec, - low_element_next_indices: Vec, - low_element_next_values: Vec, - leaves_hash_chains: Vec, - initial_root: String, - start_index: u64, - subtrees: Vec, - root_seq: u64, - ) -> AddressQueueDataV2 { - AddressQueueDataV2 { - addresses, - queue_indices, - nodes, - low_element_indices, - low_element_values, - low_element_next_indices, - low_element_next_values, - leaves_hash_chains, - initial_root, - start_index, - subtrees, - root_seq, - } - } -} diff --git a/sdk-libs/photon-api/src/models/address_queue_index.rs b/sdk-libs/photon-api/src/models/address_queue_index.rs deleted file mode 100644 index 3ce38a203d..0000000000 --- a/sdk-libs/photon-api/src/models/address_queue_index.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AddressQueueIndex { - /// A Solana public key represented as a base58 string. - #[serde(rename = "address")] - pub address: String, - #[serde(rename = "queueIndex")] - pub queue_index: u64, -} - -impl AddressQueueIndex { - pub fn new(address: String, queue_index: u64) -> AddressQueueIndex { - AddressQueueIndex { - address, - queue_index, - } - } -} diff --git a/sdk-libs/photon-api/src/models/address_with_tree.rs b/sdk-libs/photon-api/src/models/address_with_tree.rs deleted file mode 100644 index f11574103c..0000000000 --- a/sdk-libs/photon-api/src/models/address_with_tree.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AddressWithTree { - /// A Solana public key represented as a base58 string. - #[serde(rename = "address")] - pub address: String, - /// A Solana public key represented as a base58 string. - #[serde(rename = "tree")] - pub tree: String, -} - -impl AddressWithTree { - pub fn new(address: String, tree: String) -> AddressWithTree { - AddressWithTree { address, tree } - } -} diff --git a/sdk-libs/photon-api/src/models/closed_account_v2.rs b/sdk-libs/photon-api/src/models/closed_account_v2.rs deleted file mode 100644 index a8c9c47111..0000000000 --- a/sdk-libs/photon-api/src/models/closed_account_v2.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ClosedAccountV2 { - #[serde(rename = "account")] - pub account: Box, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "nullifier")] - pub nullifier: String, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "txHash")] - pub tx_hash: String, -} - -impl ClosedAccountV2 { - pub fn new(account: models::AccountV2, nullifier: String, tx_hash: String) -> ClosedAccountV2 { - ClosedAccountV2 { - account: Box::new(account), - nullifier, - tx_hash, - } - } -} diff --git a/sdk-libs/photon-api/src/models/closed_account_with_optional_token_data_v2.rs b/sdk-libs/photon-api/src/models/closed_account_with_optional_token_data_v2.rs deleted file mode 100644 index 91d4983433..0000000000 --- a/sdk-libs/photon-api/src/models/closed_account_with_optional_token_data_v2.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ClosedAccountWithOptionalTokenDataV2 { - #[serde(rename = "account")] - pub account: Box, - #[serde(rename = "optionalTokenData", skip_serializing_if = "Option::is_none")] - pub optional_token_data: Option>, -} - -impl ClosedAccountWithOptionalTokenDataV2 { - pub fn new(account: models::ClosedAccountV2) -> ClosedAccountWithOptionalTokenDataV2 { - ClosedAccountWithOptionalTokenDataV2 { - account: Box::new(account), - optional_token_data: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/cold_context.rs b/sdk-libs/photon-api/src/models/cold_context.rs deleted file mode 100644 index 11ded1c66c..0000000000 --- a/sdk-libs/photon-api/src/models/cold_context.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.51.0 - * - */ - -use crate::models; - -/// ColdContext : Compressed account context — present when account is in compressed state -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(tag = "type", rename_all = "camelCase")] -pub enum ColdContext { - /// Generic compressed account - #[serde(rename = "account")] - Account { - hash: String, - #[serde(rename = "leafIndex")] - leaf_index: u64, - #[serde(rename = "treeInfo")] - tree_info: models::InterfaceTreeInfo, - data: models::ColdData, - }, - /// Compressed token account - #[serde(rename = "token")] - Token { - hash: String, - #[serde(rename = "leafIndex")] - leaf_index: u64, - #[serde(rename = "treeInfo")] - tree_info: models::InterfaceTreeInfo, - data: models::ColdData, - }, -} diff --git a/sdk-libs/photon-api/src/models/cold_data.rs b/sdk-libs/photon-api/src/models/cold_data.rs deleted file mode 100644 index 318e7939f5..0000000000 --- a/sdk-libs/photon-api/src/models/cold_data.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.51.0 - * - */ - -/// ColdData : Structured compressed account data (discriminator separated) -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct ColdData { - /// First 8 bytes of the account data (discriminator) - pub discriminator: [u8; 8], - /// Remaining account data after discriminator, base64 encoded - pub data: String, -} - -impl ColdData { - pub fn new(discriminator: [u8; 8], data: String) -> Self { - Self { - discriminator, - data, - } - } -} diff --git a/sdk-libs/photon-api/src/models/compressed_context.rs b/sdk-libs/photon-api/src/models/compressed_context.rs deleted file mode 100644 index e664500503..0000000000 --- a/sdk-libs/photon-api/src/models/compressed_context.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -/// CompressedContext : Context information for compressed accounts -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CompressedContext { - /// The hash of the compressed account (leaf hash in Merkle tree) - #[serde(rename = "hash")] - pub hash: String, - /// The Merkle tree address - #[serde(rename = "tree")] - pub tree: String, - /// The leaf index in the Merkle tree - #[serde(rename = "leafIndex")] - pub leaf_index: u64, - /// Sequence number (None if in output queue, Some once inserted into Merkle tree) - #[serde(rename = "seq", skip_serializing_if = "Option::is_none")] - pub seq: Option, - /// Whether the account can be proven by index (in output queue) - #[serde(rename = "proveByIndex")] - pub prove_by_index: bool, -} - -impl CompressedContext { - pub fn new(hash: String, tree: String, leaf_index: u64, prove_by_index: bool) -> Self { - Self { - hash, - tree, - leaf_index, - seq: None, - prove_by_index, - } - } -} diff --git a/sdk-libs/photon-api/src/models/compressed_proof.rs b/sdk-libs/photon-api/src/models/compressed_proof.rs deleted file mode 100644 index 4c5f3f29e0..0000000000 --- a/sdk-libs/photon-api/src/models/compressed_proof.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CompressedProof { - #[serde(rename = "a")] - pub a: Vec, - #[serde(rename = "b")] - pub b: Vec, - #[serde(rename = "c")] - pub c: Vec, -} - -impl CompressedProof { - pub fn new(a: Vec, b: Vec, c: Vec) -> CompressedProof { - CompressedProof { a, b, c } - } -} diff --git a/sdk-libs/photon-api/src/models/compressed_proof_with_context.rs b/sdk-libs/photon-api/src/models/compressed_proof_with_context.rs deleted file mode 100644 index 0567824aad..0000000000 --- a/sdk-libs/photon-api/src/models/compressed_proof_with_context.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CompressedProofWithContext { - #[serde(rename = "compressedProof")] - pub compressed_proof: Box, - #[serde(rename = "leafIndices")] - pub leaf_indices: Vec, - #[serde(rename = "leaves")] - pub leaves: Vec, - #[serde(rename = "merkleTrees")] - pub merkle_trees: Vec, - #[serde(rename = "rootIndices")] - pub root_indices: Vec, - #[serde(rename = "roots")] - pub roots: Vec, -} - -impl CompressedProofWithContext { - pub fn new( - compressed_proof: models::CompressedProof, - leaf_indices: Vec, - leaves: Vec, - merkle_trees: Vec, - root_indices: Vec, - roots: Vec, - ) -> CompressedProofWithContext { - CompressedProofWithContext { - compressed_proof: Box::new(compressed_proof), - leaf_indices, - leaves, - merkle_trees, - root_indices, - roots, - } - } -} diff --git a/sdk-libs/photon-api/src/models/compressed_proof_with_context_v2.rs b/sdk-libs/photon-api/src/models/compressed_proof_with_context_v2.rs deleted file mode 100644 index 9dc17b6757..0000000000 --- a/sdk-libs/photon-api/src/models/compressed_proof_with_context_v2.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::{ - models, - models::{AccountProofInputs, AddressProofInputs}, -}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CompressedProofWithContextV2 { - #[serde(rename = "compressedProof", skip_serializing_if = "Option::is_none")] - pub compressed_proof: Option>, - - #[serde(rename = "accounts", skip_serializing_if = "Vec::is_empty")] - pub accounts: Vec, - - #[serde(rename = "addresses", skip_serializing_if = "Vec::is_empty")] - pub addresses: Vec, -} - -impl CompressedProofWithContextV2 { - pub fn new( - accounts: Vec, - addresses: Vec, - ) -> CompressedProofWithContextV2 { - CompressedProofWithContextV2 { - accounts, - addresses, - compressed_proof: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/compression_info_v2.rs b/sdk-libs/photon-api/src/models/compression_info_v2.rs deleted file mode 100644 index 699a125095..0000000000 --- a/sdk-libs/photon-api/src/models/compression_info_v2.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CompressionInfoV2 { - #[serde(rename = "closedAccounts")] - pub closed_accounts: Vec, - #[serde(rename = "openedAccounts")] - pub opened_accounts: Vec, -} - -impl CompressionInfoV2 { - pub fn new( - closed_accounts: Vec, - opened_accounts: Vec, - ) -> CompressionInfoV2 { - CompressionInfoV2 { - closed_accounts, - opened_accounts, - } - } -} diff --git a/sdk-libs/photon-api/src/models/context.rs b/sdk-libs/photon-api/src/models/context.rs deleted file mode 100644 index 3df4b4952e..0000000000 --- a/sdk-libs/photon-api/src/models/context.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Context { - #[serde(rename = "slot")] - pub slot: u64, -} - -impl Context { - pub fn new(slot: u64) -> Context { - Context { slot } - } -} diff --git a/sdk-libs/photon-api/src/models/data_slice.rs b/sdk-libs/photon-api/src/models/data_slice.rs deleted file mode 100644 index 6cf6db42c2..0000000000 --- a/sdk-libs/photon-api/src/models/data_slice.rs +++ /dev/null @@ -1,25 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DataSlice { - #[serde(rename = "length")] - pub length: u32, - #[serde(rename = "offset")] - pub offset: u32, -} - -impl DataSlice { - pub fn new(length: u32, offset: u32) -> DataSlice { - DataSlice { length, offset } - } -} diff --git a/sdk-libs/photon-api/src/models/filter_selector.rs b/sdk-libs/photon-api/src/models/filter_selector.rs deleted file mode 100644 index 4bace270cf..0000000000 --- a/sdk-libs/photon-api/src/models/filter_selector.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct FilterSelector { - #[serde(rename = "memcmp", skip_serializing_if = "Option::is_none")] - pub memcmp: Option>, -} - -impl FilterSelector { - pub fn new() -> FilterSelector { - FilterSelector { memcmp: None } - } -} diff --git a/sdk-libs/photon-api/src/models/get_compressed_account_proof_response_value.rs b/sdk-libs/photon-api/src/models/get_compressed_account_proof_response_value.rs deleted file mode 100644 index 40d32d17b4..0000000000 --- a/sdk-libs/photon-api/src/models/get_compressed_account_proof_response_value.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofResponseValue { - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "hash")] - pub hash: String, - #[serde(rename = "leafIndex")] - pub leaf_index: u64, - /// A Solana public key represented as a base58 string. - #[serde(rename = "merkleTree")] - pub merkle_tree: String, - #[serde(rename = "proof")] - pub proof: Vec, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "root")] - pub root: String, - #[serde(rename = "rootSeq")] - pub root_seq: u64, -} - -impl GetCompressedAccountProofResponseValue { - pub fn new( - hash: String, - leaf_index: u64, - merkle_tree: String, - proof: Vec, - root: String, - root_seq: u64, - ) -> GetCompressedAccountProofResponseValue { - GetCompressedAccountProofResponseValue { - hash, - leaf_index, - merkle_tree, - proof, - root, - root_seq, - } - } -} diff --git a/sdk-libs/photon-api/src/models/get_compressed_account_proof_response_value_v2.rs b/sdk-libs/photon-api/src/models/get_compressed_account_proof_response_value_v2.rs deleted file mode 100644 index 92aff2070c..0000000000 --- a/sdk-libs/photon-api/src/models/get_compressed_account_proof_response_value_v2.rs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetCompressedAccountProofResponseValueV2 { - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "hash")] - pub hash: String, - #[serde(rename = "leafIndex")] - pub leaf_index: u32, - #[serde(rename = "proof")] - pub proof: Vec, - #[serde(rename = "proveByIndex")] - pub prove_by_index: bool, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "root")] - pub root: String, - #[serde(rename = "rootSeq")] - pub root_seq: u64, - #[serde(rename = "treeContext")] - pub tree_context: Box, -} - -impl GetCompressedAccountProofResponseValueV2 { - pub fn new( - hash: String, - leaf_index: u32, - proof: Vec, - prove_by_index: bool, - root: String, - root_seq: u64, - tree_context: models::TreeContextInfo, - ) -> GetCompressedAccountProofResponseValueV2 { - GetCompressedAccountProofResponseValueV2 { - hash, - leaf_index, - proof, - prove_by_index, - root, - root_seq, - tree_context: Box::new(tree_context), - } - } -} diff --git a/sdk-libs/photon-api/src/models/get_queue_elements_response_value.rs b/sdk-libs/photon-api/src/models/get_queue_elements_response_value.rs deleted file mode 100644 index 175579c0d2..0000000000 --- a/sdk-libs/photon-api/src/models/get_queue_elements_response_value.rs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GetQueueElementsResponseValue { - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "accountHash")] - pub account_hash: String, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "leaf")] - pub leaf: String, - #[serde(rename = "leafIndex")] - pub leaf_index: u64, - #[serde(rename = "proof")] - pub proof: Vec, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "root")] - pub root: String, - #[serde(rename = "rootSeq")] - pub root_seq: u64, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "tree")] - pub tree: String, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "txHash", skip_serializing_if = "Option::is_none")] - pub tx_hash: Option, -} - -impl GetQueueElementsResponseValue { - pub fn new( - account_hash: String, - leaf: String, - leaf_index: u64, - proof: Vec, - root: String, - root_seq: u64, - tree: String, - ) -> GetQueueElementsResponseValue { - GetQueueElementsResponseValue { - account_hash, - leaf, - leaf_index, - proof, - root, - root_seq, - tree, - tx_hash: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/input_queue_data_v2.rs b/sdk-libs/photon-api/src/models/input_queue_data_v2.rs deleted file mode 100644 index 3dc2489c71..0000000000 --- a/sdk-libs/photon-api/src/models/input_queue_data_v2.rs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct InputQueueDataV2 { - #[serde(rename = "leafIndices")] - pub leaf_indices: Vec, - #[serde(rename = "accountHashes")] - pub account_hashes: Vec, - #[serde(rename = "leaves")] - pub leaves: Vec, - #[serde(rename = "txHashes")] - pub tx_hashes: Vec, - #[serde(rename = "nullifiers")] - pub nullifiers: Vec, - #[serde(rename = "firstQueueIndex")] - pub first_queue_index: u64, - #[serde(rename = "leavesHashChains")] - pub leaves_hash_chains: Vec, -} - -impl InputQueueDataV2 { - pub fn new( - leaf_indices: Vec, - account_hashes: Vec, - leaves: Vec, - tx_hashes: Vec, - nullifiers: Vec, - first_queue_index: u64, - leaves_hash_chains: Vec, - ) -> InputQueueDataV2 { - InputQueueDataV2 { - leaf_indices, - account_hashes, - leaves, - tx_hashes, - nullifiers, - first_queue_index, - leaves_hash_chains, - } - } -} diff --git a/sdk-libs/photon-api/src/models/interface_result.rs b/sdk-libs/photon-api/src/models/interface_result.rs deleted file mode 100644 index ff086836ac..0000000000 --- a/sdk-libs/photon-api/src/models/interface_result.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -/// InterfaceResult : Heterogeneous result type for batch lookups -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(tag = "type")] -pub enum InterfaceResult { - /// Generic account result - #[serde(rename = "account")] - Account(models::AccountInterface), - /// Token account result with parsed token data - #[serde(rename = "token")] - Token(models::TokenAccountInterface), -} - -impl Default for InterfaceResult { - fn default() -> Self { - Self::Account(models::AccountInterface::default()) - } -} diff --git a/sdk-libs/photon-api/src/models/memcmp.rs b/sdk-libs/photon-api/src/models/memcmp.rs deleted file mode 100644 index c984b36f8e..0000000000 --- a/sdk-libs/photon-api/src/models/memcmp.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Memcmp { - /// A base 58 encoded string. - #[serde(rename = "bytes")] - pub bytes: String, - #[serde(rename = "offset")] - pub offset: u32, -} - -impl Memcmp { - pub fn new(bytes: String, offset: u32) -> Memcmp { - Memcmp { bytes, offset } - } -} diff --git a/sdk-libs/photon-api/src/models/merkle_context_v2.rs b/sdk-libs/photon-api/src/models/merkle_context_v2.rs deleted file mode 100644 index aed6cc38b6..0000000000 --- a/sdk-libs/photon-api/src/models/merkle_context_v2.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MerkleContextV2 { - /// A Solana public key represented as a base58 string. - #[serde(rename = "cpiContext", skip_serializing_if = "Option::is_none")] - pub cpi_context: Option, - #[serde(rename = "nextTreeContext", skip_serializing_if = "Option::is_none")] - pub next_tree_context: Option>, - /// A Solana public key represented as a base58 string. - #[serde(rename = "queue")] - pub queue: String, - /// A Solana public key represented as a base58 string. - #[serde(rename = "tree")] - pub tree: String, - #[serde(rename = "treeType")] - pub tree_type: u16, -} - -impl MerkleContextV2 { - pub fn new(queue: String, tree: String, tree_type: u16) -> MerkleContextV2 { - MerkleContextV2 { - cpi_context: None, - next_tree_context: None, - queue, - tree, - tree_type, - } - } -} diff --git a/sdk-libs/photon-api/src/models/merkle_context_with_new_address_proof.rs b/sdk-libs/photon-api/src/models/merkle_context_with_new_address_proof.rs deleted file mode 100644 index 9fdc7faa2f..0000000000 --- a/sdk-libs/photon-api/src/models/merkle_context_with_new_address_proof.rs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MerkleContextWithNewAddressProof { - /// A Solana public key represented as a base58 string. - #[serde(rename = "address")] - pub address: String, - /// A Solana public key represented as a base58 string. - #[serde(rename = "higherRangeAddress")] - pub higher_range_address: String, - #[serde(rename = "lowElementLeafIndex")] - pub low_element_leaf_index: u64, - /// A Solana public key represented as a base58 string. - #[serde(rename = "lowerRangeAddress")] - pub lower_range_address: String, - /// A Solana public key represented as a base58 string. - #[serde(rename = "merkleTree")] - pub merkle_tree: String, - #[serde(rename = "nextIndex")] - pub next_index: u64, - #[serde(rename = "proof")] - pub proof: Vec, - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "root")] - pub root: String, - #[serde(rename = "rootSeq")] - pub root_seq: u64, -} - -impl MerkleContextWithNewAddressProof { - #[allow(clippy::too_many_arguments)] - pub fn new( - address: String, - higher_range_address: String, - low_element_leaf_index: u64, - lower_range_address: String, - merkle_tree: String, - next_index: u64, - proof: Vec, - root: String, - root_seq: u64, - ) -> MerkleContextWithNewAddressProof { - MerkleContextWithNewAddressProof { - address, - higher_range_address, - low_element_leaf_index, - lower_range_address, - merkle_tree, - next_index, - proof, - root, - root_seq, - } - } -} diff --git a/sdk-libs/photon-api/src/models/mod.rs b/sdk-libs/photon-api/src/models/mod.rs deleted file mode 100644 index de71f73a43..0000000000 --- a/sdk-libs/photon-api/src/models/mod.rs +++ /dev/null @@ -1,395 +0,0 @@ -pub mod account; -pub use self::account::Account; -pub mod account_context; -pub use self::account_context::AccountContext; -pub mod account_data; -pub use self::account_data::AccountData; -pub mod account_list; -pub use self::account_list::AccountList; -pub mod account_list_v2; -pub use self::account_list_v2::AccountListV2; -pub mod account_proof_inputs; -pub use self::account_proof_inputs::AccountProofInputs; -pub mod account_state; -pub use self::account_state::AccountState; -pub mod account_v2; -pub use self::account_v2::AccountV2; -pub mod account_with_context; -pub use self::account_with_context::AccountWithContext; -pub mod account_with_optional_token_data; -pub use self::account_with_optional_token_data::AccountWithOptionalTokenData; -pub mod account_with_optional_token_data_v2; -pub use self::account_with_optional_token_data_v2::AccountWithOptionalTokenDataV2; -pub mod address_proof_inputs; -pub use self::address_proof_inputs::AddressProofInputs; -pub mod address_queue_index; -pub use self::address_queue_index::AddressQueueIndex; -pub mod address_with_tree; -pub use self::address_with_tree::AddressWithTree; -pub mod closed_account_v2; -pub use self::closed_account_v2::ClosedAccountV2; -pub mod closed_account_with_optional_token_data_v2; -pub use self::closed_account_with_optional_token_data_v2::ClosedAccountWithOptionalTokenDataV2; -pub mod compressed_proof; -pub use self::compressed_proof::CompressedProof; -pub mod compressed_proof_with_context; -pub use self::compressed_proof_with_context::CompressedProofWithContext; -pub mod compressed_proof_with_context_v2; -pub use self::compressed_proof_with_context_v2::CompressedProofWithContextV2; -pub mod compression_info_v2; -pub use self::compression_info_v2::CompressionInfoV2; -pub mod context; -pub use self::context::Context; -pub mod data_slice; -pub use self::data_slice::DataSlice; -pub mod filter_selector; -pub use self::filter_selector::FilterSelector; -pub mod _get_batch_address_update_info_post_200_response; -pub use self::_get_batch_address_update_info_post_200_response::GetBatchAddressUpdateInfoPost200Response; -pub mod _get_batch_address_update_info_post_200_response_error; -pub use self::_get_batch_address_update_info_post_200_response_error::GetBatchAddressUpdateInfoPost200ResponseError; -pub mod _get_batch_address_update_info_post_200_response_result; -pub use self::_get_batch_address_update_info_post_200_response_result::GetBatchAddressUpdateInfoPost200ResponseResult; -pub mod _get_batch_address_update_info_post_429_response; -pub use self::_get_batch_address_update_info_post_429_response::GetBatchAddressUpdateInfoPost429Response; -pub mod _get_batch_address_update_info_post_request; -pub use self::_get_batch_address_update_info_post_request::GetBatchAddressUpdateInfoPostRequest; -pub mod _get_batch_address_update_info_post_request_params; -pub use self::_get_batch_address_update_info_post_request_params::GetBatchAddressUpdateInfoPostRequestParams; -pub mod _get_compressed_account_balance_post_200_response; -pub use self::_get_compressed_account_balance_post_200_response::GetCompressedAccountBalancePost200Response; -pub mod _get_compressed_account_balance_post_200_response_result; -pub use self::_get_compressed_account_balance_post_200_response_result::GetCompressedAccountBalancePost200ResponseResult; -pub mod _get_compressed_account_balance_post_request; -pub use self::_get_compressed_account_balance_post_request::GetCompressedAccountBalancePostRequest; -pub mod _get_compressed_account_post_200_response; -pub use self::_get_compressed_account_post_200_response::GetCompressedAccountPost200Response; -pub mod _get_compressed_account_post_200_response_result; -pub use self::_get_compressed_account_post_200_response_result::GetCompressedAccountPost200ResponseResult; -pub mod _get_compressed_account_post_request; -pub use self::_get_compressed_account_post_request::GetCompressedAccountPostRequest; -pub mod _get_compressed_account_post_request_params; -pub use self::_get_compressed_account_post_request_params::GetCompressedAccountPostRequestParams; -pub mod _get_compressed_account_proof_post_200_response; -pub use self::_get_compressed_account_proof_post_200_response::GetCompressedAccountProofPost200Response; -pub mod _get_compressed_account_proof_post_200_response_result; -pub use self::_get_compressed_account_proof_post_200_response_result::GetCompressedAccountProofPost200ResponseResult; -pub mod _get_compressed_account_proof_post_request; -pub use self::_get_compressed_account_proof_post_request::GetCompressedAccountProofPostRequest; -pub mod _get_compressed_account_proof_post_request_params; -pub use self::_get_compressed_account_proof_post_request_params::GetCompressedAccountProofPostRequestParams; -pub mod get_compressed_account_proof_response_value; -pub use self::get_compressed_account_proof_response_value::GetCompressedAccountProofResponseValue; -pub mod get_compressed_account_proof_response_value_v2; -pub use self::get_compressed_account_proof_response_value_v2::GetCompressedAccountProofResponseValueV2; -pub mod _get_compressed_account_proof_v2_post_200_response; -pub use self::_get_compressed_account_proof_v2_post_200_response::GetCompressedAccountProofV2Post200Response; -pub mod _get_compressed_account_proof_v2_post_200_response_result; -pub use self::_get_compressed_account_proof_v2_post_200_response_result::GetCompressedAccountProofV2Post200ResponseResult; -pub mod _get_compressed_account_proof_v2_post_request; -pub use self::_get_compressed_account_proof_v2_post_request::GetCompressedAccountProofV2PostRequest; -pub mod _get_compressed_account_v2_post_200_response; -pub use self::_get_compressed_account_v2_post_200_response::GetCompressedAccountV2Post200Response; -pub mod _get_compressed_account_v2_post_200_response_result; -pub use self::_get_compressed_account_v2_post_200_response_result::GetCompressedAccountV2Post200ResponseResult; -pub mod _get_compressed_account_v2_post_request; -pub use self::_get_compressed_account_v2_post_request::GetCompressedAccountV2PostRequest; -pub mod _get_compressed_accounts_by_owner_post_200_response; -pub use self::_get_compressed_accounts_by_owner_post_200_response::GetCompressedAccountsByOwnerPost200Response; -pub mod _get_compressed_accounts_by_owner_post_200_response_result; -pub use self::_get_compressed_accounts_by_owner_post_200_response_result::GetCompressedAccountsByOwnerPost200ResponseResult; -pub mod _get_compressed_accounts_by_owner_post_request; -pub use self::_get_compressed_accounts_by_owner_post_request::GetCompressedAccountsByOwnerPostRequest; -pub mod _get_compressed_accounts_by_owner_post_request_params; -pub use self::_get_compressed_accounts_by_owner_post_request_params::GetCompressedAccountsByOwnerPostRequestParams; -pub mod _get_compressed_accounts_by_owner_v2_post_200_response; -pub use self::_get_compressed_accounts_by_owner_v2_post_200_response::GetCompressedAccountsByOwnerV2Post200Response; -pub mod _get_compressed_accounts_by_owner_v2_post_200_response_result; -pub use self::_get_compressed_accounts_by_owner_v2_post_200_response_result::GetCompressedAccountsByOwnerV2Post200ResponseResult; -pub mod _get_compressed_accounts_by_owner_v2_post_request; -pub use self::_get_compressed_accounts_by_owner_v2_post_request::GetCompressedAccountsByOwnerV2PostRequest; -pub mod _get_compressed_balance_by_owner_post_request; -pub use self::_get_compressed_balance_by_owner_post_request::GetCompressedBalanceByOwnerPostRequest; -pub mod _get_compressed_balance_by_owner_post_request_params; -pub use self::_get_compressed_balance_by_owner_post_request_params::GetCompressedBalanceByOwnerPostRequestParams; -pub mod _get_compressed_mint_token_holders_post_200_response; -pub use self::_get_compressed_mint_token_holders_post_200_response::GetCompressedMintTokenHoldersPost200Response; -pub mod _get_compressed_mint_token_holders_post_200_response_result; -pub use self::_get_compressed_mint_token_holders_post_200_response_result::GetCompressedMintTokenHoldersPost200ResponseResult; -pub mod _get_compressed_mint_token_holders_post_request; -pub use self::_get_compressed_mint_token_holders_post_request::GetCompressedMintTokenHoldersPostRequest; -pub mod _get_compressed_mint_token_holders_post_request_params; -pub use self::_get_compressed_mint_token_holders_post_request_params::GetCompressedMintTokenHoldersPostRequestParams; -pub mod _get_compressed_token_account_balance_post_200_response; -pub use self::_get_compressed_token_account_balance_post_200_response::GetCompressedTokenAccountBalancePost200Response; -pub mod _get_compressed_token_account_balance_post_200_response_result; -pub use self::_get_compressed_token_account_balance_post_200_response_result::GetCompressedTokenAccountBalancePost200ResponseResult; -pub mod _get_compressed_token_account_balance_post_request; -pub use self::_get_compressed_token_account_balance_post_request::GetCompressedTokenAccountBalancePostRequest; -pub mod _get_compressed_token_accounts_by_delegate_post_200_response; -pub use self::_get_compressed_token_accounts_by_delegate_post_200_response::GetCompressedTokenAccountsByDelegatePost200Response; -pub mod _get_compressed_token_accounts_by_delegate_post_200_response_result; -pub use self::_get_compressed_token_accounts_by_delegate_post_200_response_result::GetCompressedTokenAccountsByDelegatePost200ResponseResult; -pub mod _get_compressed_token_accounts_by_delegate_post_request; -pub use self::_get_compressed_token_accounts_by_delegate_post_request::GetCompressedTokenAccountsByDelegatePostRequest; -pub mod _get_compressed_token_accounts_by_delegate_post_request_params; -pub use self::_get_compressed_token_accounts_by_delegate_post_request_params::GetCompressedTokenAccountsByDelegatePostRequestParams; -pub mod _get_compressed_token_accounts_by_delegate_v2_post_200_response; -pub use self::_get_compressed_token_accounts_by_delegate_v2_post_200_response::GetCompressedTokenAccountsByDelegateV2Post200Response; -pub mod _get_compressed_token_accounts_by_delegate_v2_post_200_response_result; -pub use self::_get_compressed_token_accounts_by_delegate_v2_post_200_response_result::GetCompressedTokenAccountsByDelegateV2Post200ResponseResult; -pub mod _get_compressed_token_accounts_by_delegate_v2_post_request; -pub use self::_get_compressed_token_accounts_by_delegate_v2_post_request::GetCompressedTokenAccountsByDelegateV2PostRequest; -pub mod _get_compressed_token_accounts_by_owner_post_request; -pub use self::_get_compressed_token_accounts_by_owner_post_request::GetCompressedTokenAccountsByOwnerPostRequest; -pub mod _get_compressed_token_accounts_by_owner_post_request_params; -pub use self::_get_compressed_token_accounts_by_owner_post_request_params::GetCompressedTokenAccountsByOwnerPostRequestParams; -pub mod _get_compressed_token_accounts_by_owner_v2_post_request; -pub use self::_get_compressed_token_accounts_by_owner_v2_post_request::GetCompressedTokenAccountsByOwnerV2PostRequest; -pub mod _get_compressed_token_balances_by_owner_post_200_response; -pub use self::_get_compressed_token_balances_by_owner_post_200_response::GetCompressedTokenBalancesByOwnerPost200Response; -pub mod _get_compressed_token_balances_by_owner_post_200_response_result; -pub use self::_get_compressed_token_balances_by_owner_post_200_response_result::GetCompressedTokenBalancesByOwnerPost200ResponseResult; -pub mod _get_compressed_token_balances_by_owner_post_request; -pub use self::_get_compressed_token_balances_by_owner_post_request::GetCompressedTokenBalancesByOwnerPostRequest; -pub mod _get_compressed_token_balances_by_owner_v2_post_200_response; -pub use self::_get_compressed_token_balances_by_owner_v2_post_200_response::GetCompressedTokenBalancesByOwnerV2Post200Response; -pub mod _get_compressed_token_balances_by_owner_v2_post_200_response_result; -pub use self::_get_compressed_token_balances_by_owner_v2_post_200_response_result::GetCompressedTokenBalancesByOwnerV2Post200ResponseResult; -pub mod _get_compressed_token_balances_by_owner_v2_post_request; -pub use self::_get_compressed_token_balances_by_owner_v2_post_request::GetCompressedTokenBalancesByOwnerV2PostRequest; -pub mod _get_compression_signatures_for_account_post_200_response; -pub use self::_get_compression_signatures_for_account_post_200_response::GetCompressionSignaturesForAccountPost200Response; -pub mod _get_compression_signatures_for_account_post_200_response_result; -pub use self::_get_compression_signatures_for_account_post_200_response_result::GetCompressionSignaturesForAccountPost200ResponseResult; -pub mod _get_compression_signatures_for_account_post_request; -pub use self::_get_compression_signatures_for_account_post_request::GetCompressionSignaturesForAccountPostRequest; -pub mod _get_compression_signatures_for_address_post_200_response; -pub use self::_get_compression_signatures_for_address_post_200_response::GetCompressionSignaturesForAddressPost200Response; -pub mod _get_compression_signatures_for_address_post_200_response_result; -pub use self::_get_compression_signatures_for_address_post_200_response_result::GetCompressionSignaturesForAddressPost200ResponseResult; -pub mod _get_compression_signatures_for_address_post_request; -pub use self::_get_compression_signatures_for_address_post_request::GetCompressionSignaturesForAddressPostRequest; -pub mod _get_compression_signatures_for_address_post_request_params; -pub use self::_get_compression_signatures_for_address_post_request_params::GetCompressionSignaturesForAddressPostRequestParams; -pub mod _get_compression_signatures_for_owner_post_request; -pub use self::_get_compression_signatures_for_owner_post_request::GetCompressionSignaturesForOwnerPostRequest; -pub mod _get_compression_signatures_for_owner_post_request_params; -pub use self::_get_compression_signatures_for_owner_post_request_params::GetCompressionSignaturesForOwnerPostRequestParams; -pub mod _get_compression_signatures_for_token_owner_post_request; -pub use self::_get_compression_signatures_for_token_owner_post_request::GetCompressionSignaturesForTokenOwnerPostRequest; -pub mod _get_indexer_health_post_200_response; -pub use self::_get_indexer_health_post_200_response::GetIndexerHealthPost200Response; -pub mod _get_indexer_health_post_request; -pub use self::_get_indexer_health_post_request::GetIndexerHealthPostRequest; -pub mod _get_indexer_slot_post_200_response; -pub use self::_get_indexer_slot_post_200_response::GetIndexerSlotPost200Response; -pub mod _get_indexer_slot_post_request; -pub use self::_get_indexer_slot_post_request::GetIndexerSlotPostRequest; -pub mod _get_latest_compression_signatures_post_request; -pub use self::_get_latest_compression_signatures_post_request::GetLatestCompressionSignaturesPostRequest; -pub mod _get_latest_compression_signatures_post_request_params; -pub use self::_get_latest_compression_signatures_post_request_params::GetLatestCompressionSignaturesPostRequestParams; -pub mod _get_latest_non_voting_signatures_post_200_response; -pub use self::_get_latest_non_voting_signatures_post_200_response::GetLatestNonVotingSignaturesPost200Response; -pub mod _get_latest_non_voting_signatures_post_200_response_result; -pub use self::_get_latest_non_voting_signatures_post_200_response_result::GetLatestNonVotingSignaturesPost200ResponseResult; -pub mod _get_latest_non_voting_signatures_post_request; -pub use self::_get_latest_non_voting_signatures_post_request::GetLatestNonVotingSignaturesPostRequest; -pub mod _get_multiple_compressed_account_proofs_post_200_response; -pub use self::_get_multiple_compressed_account_proofs_post_200_response::GetMultipleCompressedAccountProofsPost200Response; -pub mod _get_multiple_compressed_account_proofs_post_200_response_result; -pub use self::_get_multiple_compressed_account_proofs_post_200_response_result::GetMultipleCompressedAccountProofsPost200ResponseResult; -pub mod _get_multiple_compressed_account_proofs_post_request; -pub use self::_get_multiple_compressed_account_proofs_post_request::GetMultipleCompressedAccountProofsPostRequest; -pub mod _get_multiple_compressed_account_proofs_v2_post_200_response; -pub use self::_get_multiple_compressed_account_proofs_v2_post_200_response::GetMultipleCompressedAccountProofsV2Post200Response; -pub mod _get_multiple_compressed_account_proofs_v2_post_200_response_result; -pub use self::_get_multiple_compressed_account_proofs_v2_post_200_response_result::GetMultipleCompressedAccountProofsV2Post200ResponseResult; -pub mod _get_multiple_compressed_account_proofs_v2_post_request; -pub use self::_get_multiple_compressed_account_proofs_v2_post_request::GetMultipleCompressedAccountProofsV2PostRequest; -pub mod _get_multiple_compressed_accounts_post_200_response; -pub use self::_get_multiple_compressed_accounts_post_200_response::GetMultipleCompressedAccountsPost200Response; -pub mod _get_multiple_compressed_accounts_post_200_response_result; -pub use self::_get_multiple_compressed_accounts_post_200_response_result::GetMultipleCompressedAccountsPost200ResponseResult; -pub mod _get_multiple_compressed_accounts_post_request; -pub use self::_get_multiple_compressed_accounts_post_request::GetMultipleCompressedAccountsPostRequest; -pub mod _get_multiple_compressed_accounts_post_request_params; -pub use self::_get_multiple_compressed_accounts_post_request_params::GetMultipleCompressedAccountsPostRequestParams; -pub mod _get_multiple_compressed_accounts_v2_post_200_response; -pub use self::_get_multiple_compressed_accounts_v2_post_200_response::GetMultipleCompressedAccountsV2Post200Response; -pub mod _get_multiple_compressed_accounts_v2_post_200_response_result; -pub use self::_get_multiple_compressed_accounts_v2_post_200_response_result::GetMultipleCompressedAccountsV2Post200ResponseResult; -pub mod _get_multiple_compressed_accounts_v2_post_request; -pub use self::_get_multiple_compressed_accounts_v2_post_request::GetMultipleCompressedAccountsV2PostRequest; -pub mod _get_multiple_compressed_accounts_v2_post_request_params; -pub use self::_get_multiple_compressed_accounts_v2_post_request_params::GetMultipleCompressedAccountsV2PostRequestParams; -pub mod _get_multiple_new_address_proofs_post_200_response; -pub use self::_get_multiple_new_address_proofs_post_200_response::GetMultipleNewAddressProofsPost200Response; -pub mod _get_multiple_new_address_proofs_post_200_response_result; -pub use self::_get_multiple_new_address_proofs_post_200_response_result::GetMultipleNewAddressProofsPost200ResponseResult; -pub mod _get_multiple_new_address_proofs_post_request; -pub use self::_get_multiple_new_address_proofs_post_request::GetMultipleNewAddressProofsPostRequest; -pub mod _get_multiple_new_address_proofs_v2_post_request; -pub use self::_get_multiple_new_address_proofs_v2_post_request::GetMultipleNewAddressProofsV2PostRequest; -pub mod _get_queue_elements_post_200_response; -pub use self::_get_queue_elements_post_200_response::GetQueueElementsPost200Response; -pub mod _get_queue_elements_post_200_response_result; -pub use self::_get_queue_elements_post_200_response_result::GetQueueElementsPost200ResponseResult; -pub mod _get_queue_elements_post_request; -pub use self::_get_queue_elements_post_request::GetQueueElementsPostRequest; -pub mod _get_queue_elements_post_request_params; -pub use self::_get_queue_elements_post_request_params::GetQueueElementsPostRequestParams; -pub mod get_queue_elements_response_value; -pub use self::get_queue_elements_response_value::GetQueueElementsResponseValue; -pub mod _get_transaction_with_compression_info_post_200_response; -pub use self::_get_transaction_with_compression_info_post_200_response::GetTransactionWithCompressionInfoPost200Response; -pub mod _get_transaction_with_compression_info_post_200_response_result; -pub use self::_get_transaction_with_compression_info_post_200_response_result::GetTransactionWithCompressionInfoPost200ResponseResult; -pub mod _get_transaction_with_compression_info_post_200_response_result_compression_info; -pub use self::_get_transaction_with_compression_info_post_200_response_result_compression_info::GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo; -pub mod _get_transaction_with_compression_info_post_request; -pub use self::_get_transaction_with_compression_info_post_request::GetTransactionWithCompressionInfoPostRequest; -pub mod _get_transaction_with_compression_info_post_request_params; -pub use self::_get_transaction_with_compression_info_post_request_params::GetTransactionWithCompressionInfoPostRequestParams; -pub mod _get_transaction_with_compression_info_v2_post_200_response; -pub use self::_get_transaction_with_compression_info_v2_post_200_response::GetTransactionWithCompressionInfoV2Post200Response; -pub mod _get_transaction_with_compression_info_v2_post_200_response_result; -pub use self::_get_transaction_with_compression_info_v2_post_200_response_result::GetTransactionWithCompressionInfoV2Post200ResponseResult; -pub mod _get_transaction_with_compression_info_v2_post_200_response_result_compression_info; -pub use self::_get_transaction_with_compression_info_v2_post_200_response_result_compression_info::GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo; -pub mod _get_transaction_with_compression_info_v2_post_request; -pub use self::_get_transaction_with_compression_info_v2_post_request::GetTransactionWithCompressionInfoV2PostRequest; -pub mod _get_validity_proof_post_200_response; -pub use self::_get_validity_proof_post_200_response::GetValidityProofPost200Response; -pub mod _get_validity_proof_post_200_response_result; -pub use self::_get_validity_proof_post_200_response_result::GetValidityProofPost200ResponseResult; -pub mod _get_validity_proof_post_request; -pub use self::_get_validity_proof_post_request::GetValidityProofPostRequest; -pub mod _get_validity_proof_post_request_params; -pub use self::_get_validity_proof_post_request_params::GetValidityProofPostRequestParams; -pub mod _get_validity_proof_v2_post_200_response; -pub use self::_get_validity_proof_v2_post_200_response::GetValidityProofV2Post200Response; -pub mod _get_validity_proof_v2_post_200_response_result; -pub use self::_get_validity_proof_v2_post_200_response_result::GetValidityProofV2Post200ResponseResult; -pub mod _get_validity_proof_v2_post_request; -pub use self::_get_validity_proof_v2_post_request::GetValidityProofV2PostRequest; -pub mod memcmp; -pub use self::memcmp::Memcmp; -pub mod merkle_context_v2; -pub use self::merkle_context_v2::MerkleContextV2; -pub mod merkle_context_with_new_address_proof; -pub use self::merkle_context_with_new_address_proof::MerkleContextWithNewAddressProof; -pub mod owner_balance; -pub use self::owner_balance::OwnerBalance; -pub mod owner_balance_list; -pub use self::owner_balance_list::OwnerBalanceList; -pub mod owner_balances_response; -pub use self::owner_balances_response::OwnerBalancesResponse; -pub mod paginated_account_list; -pub use self::paginated_account_list::PaginatedAccountList; -pub mod paginated_account_list_v2; -pub use self::paginated_account_list_v2::PaginatedAccountListV2; -pub mod paginated_signature_info_list; -pub use self::paginated_signature_info_list::PaginatedSignatureInfoList; -pub mod root_index; -pub use self::root_index::RootIndex; -pub mod signature_info; -pub use self::signature_info::SignatureInfo; -pub mod signature_info_list; -pub use self::signature_info_list::SignatureInfoList; -pub mod signature_info_list_with_error; -pub use self::signature_info_list_with_error::SignatureInfoListWithError; -pub mod signature_info_with_error; -pub use self::signature_info_with_error::SignatureInfoWithError; -pub mod token_account; -pub use self::token_account::TokenAccount; -pub mod token_account_balance; -pub use self::token_account_balance::TokenAccountBalance; -pub mod token_account_list; -pub use self::token_account_list::TokenAccountList; -pub mod token_account_list_v2; -pub use self::token_account_list_v2::TokenAccountListV2; -pub mod token_account_v2; -pub use self::token_account_v2::TokenAccountV2; -pub mod token_balance; -pub use self::token_balance::TokenBalance; -pub mod token_balance_list; -pub use self::token_balance_list::TokenBalanceList; -pub mod token_balance_list_v2; -pub use self::token_balance_list_v2::TokenBalanceListV2; -pub mod token_data; -pub use self::token_data::TokenData; -pub mod tree_context_info; -pub use self::tree_context_info::TreeContextInfo; -pub mod _get_queue_info_post_request; -pub use self::_get_queue_info_post_request::GetQueueInfoPostRequest; -pub mod _get_queue_info_post_200_response; -pub use self::_get_queue_info_post_200_response::GetQueueInfoPost200Response; -pub mod _get_queue_info_post_200_response_result; -pub use self::_get_queue_info_post_200_response_result::{ - GetQueueInfoPost200ResponseResult, QueueInfo, -}; -pub mod address_queue_data_v2; -pub use self::address_queue_data_v2::AddressQueueDataV2; -pub mod input_queue_data_v2; -pub use self::input_queue_data_v2::InputQueueDataV2; -pub mod output_queue_data_v2; -pub use self::output_queue_data_v2::OutputQueueDataV2; -pub mod state_queue_data_v2; -pub use self::state_queue_data_v2::StateQueueDataV2; -pub mod node; -pub use self::node::Node; -pub mod queue_request; -pub use self::queue_request::QueueRequest; -// Interface types -pub mod solana_account_data; -pub use self::solana_account_data::SolanaAccountData; -pub mod cold_data; -pub use self::cold_data::ColdData; -pub mod tree_info; -pub use self::tree_info::{TreeInfo as InterfaceTreeInfo, TreeType}; -pub mod cold_context; -pub use self::cold_context::ColdContext; -pub mod account_interface; -pub use self::account_interface::AccountInterface; -pub mod token_account_interface; -pub use self::token_account_interface::TokenAccountInterface; -pub mod interface_result; -pub use self::interface_result::InterfaceResult; -// getAccountInterface -pub mod _get_account_interface_post_request_params; -pub use self::_get_account_interface_post_request_params::GetAccountInterfacePostRequestParams; -pub mod _get_account_interface_post_request; -pub use self::_get_account_interface_post_request::GetAccountInterfacePostRequest; -pub mod _get_account_interface_post_200_response_result; -pub use self::_get_account_interface_post_200_response_result::GetAccountInterfacePost200ResponseResult; -pub mod _get_account_interface_post_200_response; -pub use self::_get_account_interface_post_200_response::GetAccountInterfacePost200Response; -// getTokenAccountInterface -pub mod _get_token_account_interface_post_request_params; -pub use self::_get_token_account_interface_post_request_params::GetTokenAccountInterfacePostRequestParams; -pub mod _get_token_account_interface_post_request; -pub use self::_get_token_account_interface_post_request::GetTokenAccountInterfacePostRequest; -pub mod _get_token_account_interface_post_200_response_result; -pub use self::_get_token_account_interface_post_200_response_result::GetTokenAccountInterfacePost200ResponseResult; -pub mod _get_token_account_interface_post_200_response; -pub use self::_get_token_account_interface_post_200_response::GetTokenAccountInterfacePost200Response; -// getAtaInterface -pub mod _get_ata_interface_post_request_params; -pub use self::_get_ata_interface_post_request_params::GetAtaInterfacePostRequestParams; -pub mod _get_ata_interface_post_request; -pub use self::_get_ata_interface_post_request::GetAtaInterfacePostRequest; -pub mod _get_ata_interface_post_200_response_result; -pub use self::_get_ata_interface_post_200_response_result::GetAtaInterfacePost200ResponseResult; -pub mod _get_ata_interface_post_200_response; -pub use self::_get_ata_interface_post_200_response::GetAtaInterfacePost200Response; -// getMultipleAccountInterfaces -pub mod _get_multiple_account_interfaces_post_request_params; -pub use self::_get_multiple_account_interfaces_post_request_params::GetMultipleAccountInterfacesPostRequestParams; -pub mod _get_multiple_account_interfaces_post_request; -pub use self::_get_multiple_account_interfaces_post_request::GetMultipleAccountInterfacesPostRequest; -pub mod _get_multiple_account_interfaces_post_200_response_result; -pub use self::_get_multiple_account_interfaces_post_200_response_result::GetMultipleAccountInterfacesPost200ResponseResult; -pub mod _get_multiple_account_interfaces_post_200_response; -pub use self::_get_multiple_account_interfaces_post_200_response::GetMultipleAccountInterfacesPost200Response; diff --git a/sdk-libs/photon-api/src/models/node.rs b/sdk-libs/photon-api/src/models/node.rs deleted file mode 100644 index 695363db2c..0000000000 --- a/sdk-libs/photon-api/src/models/node.rs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// A tree node with its encoded index and hash -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct Node { - /// Encoded node index: (level << 56) | position - pub index: u64, - pub hash: String, -} - -impl Node { - pub fn new(index: u64, hash: String) -> Node { - Node { index, hash } - } -} diff --git a/sdk-libs/photon-api/src/models/output_queue_data_v2.rs b/sdk-libs/photon-api/src/models/output_queue_data_v2.rs deleted file mode 100644 index 39ffd5448e..0000000000 --- a/sdk-libs/photon-api/src/models/output_queue_data_v2.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OutputQueueDataV2 { - #[serde(rename = "leafIndices")] - pub leaf_indices: Vec, - #[serde(rename = "accountHashes")] - pub account_hashes: Vec, - #[serde(rename = "leaves")] - pub leaves: Vec, - #[serde(rename = "firstQueueIndex")] - pub first_queue_index: u64, - #[serde(rename = "nextIndex")] - pub next_index: u64, - #[serde(rename = "leavesHashChains")] - pub leaves_hash_chains: Vec, -} - -impl OutputQueueDataV2 { - pub fn new( - leaf_indices: Vec, - account_hashes: Vec, - leaves: Vec, - first_queue_index: u64, - next_index: u64, - leaves_hash_chains: Vec, - ) -> OutputQueueDataV2 { - OutputQueueDataV2 { - leaf_indices, - account_hashes, - leaves, - first_queue_index, - next_index, - leaves_hash_chains, - } - } -} diff --git a/sdk-libs/photon-api/src/models/owner_balance.rs b/sdk-libs/photon-api/src/models/owner_balance.rs deleted file mode 100644 index 71658fedef..0000000000 --- a/sdk-libs/photon-api/src/models/owner_balance.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OwnerBalance { - #[serde(rename = "balance")] - pub balance: u64, - /// A Solana public key represented as a base58 string. - #[serde(rename = "owner")] - pub owner: String, -} - -impl OwnerBalance { - pub fn new(balance: u64, owner: String) -> OwnerBalance { - OwnerBalance { balance, owner } - } -} diff --git a/sdk-libs/photon-api/src/models/owner_balance_list.rs b/sdk-libs/photon-api/src/models/owner_balance_list.rs deleted file mode 100644 index da04db55fc..0000000000 --- a/sdk-libs/photon-api/src/models/owner_balance_list.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OwnerBalanceList { - /// A base 58 encoded string. - #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "items")] - pub items: Vec, -} - -impl OwnerBalanceList { - pub fn new(items: Vec) -> OwnerBalanceList { - OwnerBalanceList { - cursor: None, - items, - } - } -} diff --git a/sdk-libs/photon-api/src/models/owner_balances_response.rs b/sdk-libs/photon-api/src/models/owner_balances_response.rs deleted file mode 100644 index 3eb46d8ca9..0000000000 --- a/sdk-libs/photon-api/src/models/owner_balances_response.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OwnerBalancesResponse { - #[serde(rename = "context")] - pub context: Box, - #[serde(rename = "value")] - pub value: Box, -} - -impl OwnerBalancesResponse { - pub fn new(context: models::Context, value: models::OwnerBalanceList) -> OwnerBalancesResponse { - OwnerBalancesResponse { - context: Box::new(context), - value: Box::new(value), - } - } -} diff --git a/sdk-libs/photon-api/src/models/paginated_account_list.rs b/sdk-libs/photon-api/src/models/paginated_account_list.rs deleted file mode 100644 index 7ffd95551d..0000000000 --- a/sdk-libs/photon-api/src/models/paginated_account_list.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PaginatedAccountList { - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "items")] - pub items: Vec, -} - -impl PaginatedAccountList { - pub fn new(items: Vec) -> PaginatedAccountList { - PaginatedAccountList { - cursor: None, - items, - } - } -} diff --git a/sdk-libs/photon-api/src/models/paginated_account_list_v2.rs b/sdk-libs/photon-api/src/models/paginated_account_list_v2.rs deleted file mode 100644 index 34289608d3..0000000000 --- a/sdk-libs/photon-api/src/models/paginated_account_list_v2.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PaginatedAccountListV2 { - /// A 32-byte hash represented as a base58 string. - #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "items")] - pub items: Vec, -} - -impl PaginatedAccountListV2 { - pub fn new(items: Vec) -> PaginatedAccountListV2 { - PaginatedAccountListV2 { - cursor: None, - items, - } - } -} diff --git a/sdk-libs/photon-api/src/models/paginated_signature_info_list.rs b/sdk-libs/photon-api/src/models/paginated_signature_info_list.rs deleted file mode 100644 index 13070a79eb..0000000000 --- a/sdk-libs/photon-api/src/models/paginated_signature_info_list.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PaginatedSignatureInfoList { - #[serde(rename = "cursor", default, skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "items")] - pub items: Vec, -} - -impl PaginatedSignatureInfoList { - pub fn new(items: Vec) -> PaginatedSignatureInfoList { - PaginatedSignatureInfoList { - cursor: None, - items, - } - } -} diff --git a/sdk-libs/photon-api/src/models/queue_request.rs b/sdk-libs/photon-api/src/models/queue_request.rs deleted file mode 100644 index 55d45d2c80..0000000000 --- a/sdk-libs/photon-api/src/models/queue_request.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// Parameters for requesting queue elements -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct QueueRequest { - pub limit: u16, - #[serde(skip_serializing_if = "Option::is_none")] - pub start_index: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub zkp_batch_size: Option, -} - -impl QueueRequest { - pub fn new(limit: u16) -> QueueRequest { - QueueRequest { - limit, - start_index: None, - zkp_batch_size: None, - } - } - - pub fn with_start_index(mut self, start_index: u64) -> Self { - self.start_index = Some(start_index); - self - } - - pub fn with_zkp_batch_size(mut self, zkp_batch_size: u16) -> Self { - self.zkp_batch_size = Some(zkp_batch_size); - self - } -} diff --git a/sdk-libs/photon-api/src/models/resolved_from.rs b/sdk-libs/photon-api/src/models/resolved_from.rs deleted file mode 100644 index c79935af7e..0000000000 --- a/sdk-libs/photon-api/src/models/resolved_from.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -/// ResolvedFrom : Indicates the source of the resolved account data -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ResolvedFrom { - #[serde(rename = "onchain")] - Onchain, - #[serde(rename = "compressed")] - Compressed, -} - -impl Default for ResolvedFrom { - fn default() -> Self { - Self::Onchain - } -} diff --git a/sdk-libs/photon-api/src/models/root_index.rs b/sdk-libs/photon-api/src/models/root_index.rs deleted file mode 100644 index ff87169a88..0000000000 --- a/sdk-libs/photon-api/src/models/root_index.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RootIndex { - #[serde(rename = "proveByIndex")] - pub prove_by_index: bool, - #[serde(rename = "rootIndex")] - pub root_index: u16, -} - -impl RootIndex { - pub fn new(prove_by_index: bool, root_index: u16) -> RootIndex { - RootIndex { - prove_by_index, - root_index, - } - } -} diff --git a/sdk-libs/photon-api/src/models/signature_info.rs b/sdk-libs/photon-api/src/models/signature_info.rs deleted file mode 100644 index caaf338c67..0000000000 --- a/sdk-libs/photon-api/src/models/signature_info.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SignatureInfo { - /// An Unix timestamp (seconds) - #[serde(rename = "blockTime")] - pub block_time: u64, - /// A Solana transaction signature. - #[serde(rename = "signature")] - pub signature: String, - #[serde(rename = "slot")] - pub slot: u64, -} - -impl SignatureInfo { - pub fn new(block_time: u64, signature: String, slot: u64) -> SignatureInfo { - SignatureInfo { - block_time, - signature, - slot, - } - } -} diff --git a/sdk-libs/photon-api/src/models/signature_info_list.rs b/sdk-libs/photon-api/src/models/signature_info_list.rs deleted file mode 100644 index f5624d58cb..0000000000 --- a/sdk-libs/photon-api/src/models/signature_info_list.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SignatureInfoList { - #[serde(rename = "items")] - pub items: Vec, -} - -impl SignatureInfoList { - pub fn new(items: Vec) -> SignatureInfoList { - SignatureInfoList { items } - } -} diff --git a/sdk-libs/photon-api/src/models/signature_info_list_with_error.rs b/sdk-libs/photon-api/src/models/signature_info_list_with_error.rs deleted file mode 100644 index 1dd8c4837b..0000000000 --- a/sdk-libs/photon-api/src/models/signature_info_list_with_error.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SignatureInfoListWithError { - #[serde(rename = "items")] - pub items: Vec, -} - -impl SignatureInfoListWithError { - pub fn new(items: Vec) -> SignatureInfoListWithError { - SignatureInfoListWithError { items } - } -} diff --git a/sdk-libs/photon-api/src/models/signature_info_with_error.rs b/sdk-libs/photon-api/src/models/signature_info_with_error.rs deleted file mode 100644 index 06b78860f7..0000000000 --- a/sdk-libs/photon-api/src/models/signature_info_with_error.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SignatureInfoWithError { - /// An Unix timestamp (seconds) - #[serde(rename = "blockTime")] - pub block_time: u64, - #[serde(rename = "error", default, skip_serializing_if = "Option::is_none")] - pub error: Option, - /// A Solana transaction signature. - #[serde(rename = "signature")] - pub signature: String, - #[serde(rename = "slot")] - pub slot: u64, -} - -impl SignatureInfoWithError { - pub fn new(block_time: u64, signature: String, slot: u64) -> SignatureInfoWithError { - SignatureInfoWithError { - block_time, - error: None, - signature, - slot, - } - } -} diff --git a/sdk-libs/photon-api/src/models/solana_account_data.rs b/sdk-libs/photon-api/src/models/solana_account_data.rs deleted file mode 100644 index 5d4142b840..0000000000 --- a/sdk-libs/photon-api/src/models/solana_account_data.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.51.0 - * - */ - -/// SolanaAccountData : Standard Solana account fields (matches getAccountInfo shape) -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct SolanaAccountData { - pub lamports: u64, - pub data: String, - pub owner: String, - pub executable: bool, - pub rent_epoch: u64, - pub space: u64, -} - -impl SolanaAccountData { - pub fn new( - lamports: u64, - data: String, - owner: String, - executable: bool, - rent_epoch: u64, - space: u64, - ) -> Self { - Self { - lamports, - data, - owner, - executable, - rent_epoch, - space, - } - } -} diff --git a/sdk-libs/photon-api/src/models/state_queue_data_v2.rs b/sdk-libs/photon-api/src/models/state_queue_data_v2.rs deleted file mode 100644 index b04e09c600..0000000000 --- a/sdk-libs/photon-api/src/models/state_queue_data_v2.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -/// State queue data with shared tree nodes for output and input queues -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[allow(clippy::too_many_arguments)] -pub struct StateQueueDataV2 { - /// Shared deduplicated tree nodes for state queues (output + input) - #[serde(skip_serializing_if = "Vec::is_empty", default)] - pub nodes: Vec, - /// Initial root for the state tree (shared by output and input queues) - pub initial_root: String, - /// Sequence number of the root - pub root_seq: u64, - #[serde(skip_serializing_if = "Option::is_none")] - pub output_queue: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub input_queue: Option>, -} - -impl StateQueueDataV2 { - pub fn new(initial_root: String, root_seq: u64) -> StateQueueDataV2 { - StateQueueDataV2 { - nodes: Vec::new(), - initial_root, - root_seq, - output_queue: None, - input_queue: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/token_account.rs b/sdk-libs/photon-api/src/models/token_account.rs deleted file mode 100644 index f706d56009..0000000000 --- a/sdk-libs/photon-api/src/models/token_account.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenAccount { - #[serde(rename = "account")] - pub account: Box, - #[serde(rename = "tokenData")] - pub token_data: Box, -} - -impl TokenAccount { - pub fn new(account: models::Account, token_data: models::TokenData) -> TokenAccount { - TokenAccount { - account: Box::new(account), - token_data: Box::new(token_data), - } - } -} diff --git a/sdk-libs/photon-api/src/models/token_account_balance.rs b/sdk-libs/photon-api/src/models/token_account_balance.rs deleted file mode 100644 index 17aa2e4925..0000000000 --- a/sdk-libs/photon-api/src/models/token_account_balance.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenAccountBalance { - #[serde(rename = "amount")] - pub amount: u64, -} - -impl TokenAccountBalance { - pub fn new(amount: u64) -> TokenAccountBalance { - TokenAccountBalance { amount } - } -} diff --git a/sdk-libs/photon-api/src/models/token_account_interface.rs b/sdk-libs/photon-api/src/models/token_account_interface.rs deleted file mode 100644 index 3e3080c100..0000000000 --- a/sdk-libs/photon-api/src/models/token_account_interface.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - */ - -use crate::models; - -/// TokenAccountInterface : Token account interface with parsed token data -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenAccountInterface { - /// Base account interface data (flattened) - #[serde(flatten)] - pub account: models::AccountInterface, - /// Parsed token account data - #[serde(rename = "tokenData")] - pub token_data: models::TokenData, -} - -impl TokenAccountInterface { - pub fn new(account: models::AccountInterface, token_data: models::TokenData) -> Self { - Self { - account, - token_data, - } - } -} diff --git a/sdk-libs/photon-api/src/models/token_account_list.rs b/sdk-libs/photon-api/src/models/token_account_list.rs deleted file mode 100644 index 7b80b65dee..0000000000 --- a/sdk-libs/photon-api/src/models/token_account_list.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenAccountList { - /// A base 58 encoded string. - #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "items")] - pub items: Vec, -} - -impl TokenAccountList { - pub fn new(items: Vec) -> TokenAccountList { - TokenAccountList { - cursor: None, - items, - } - } -} diff --git a/sdk-libs/photon-api/src/models/token_account_list_v2.rs b/sdk-libs/photon-api/src/models/token_account_list_v2.rs deleted file mode 100644 index 10823af439..0000000000 --- a/sdk-libs/photon-api/src/models/token_account_list_v2.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenAccountListV2 { - /// A base 58 encoded string. - #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "items")] - pub items: Vec, -} - -impl TokenAccountListV2 { - pub fn new(items: Vec) -> TokenAccountListV2 { - TokenAccountListV2 { - cursor: None, - items, - } - } -} diff --git a/sdk-libs/photon-api/src/models/token_account_v2.rs b/sdk-libs/photon-api/src/models/token_account_v2.rs deleted file mode 100644 index 7be555854f..0000000000 --- a/sdk-libs/photon-api/src/models/token_account_v2.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenAccountV2 { - #[serde(rename = "account")] - pub account: Box, - #[serde(rename = "tokenData")] - pub token_data: Box, -} - -impl TokenAccountV2 { - pub fn new(account: models::AccountV2, token_data: models::TokenData) -> TokenAccountV2 { - TokenAccountV2 { - account: Box::new(account), - token_data: Box::new(token_data), - } - } -} diff --git a/sdk-libs/photon-api/src/models/token_balance.rs b/sdk-libs/photon-api/src/models/token_balance.rs deleted file mode 100644 index 6f02c6b1fa..0000000000 --- a/sdk-libs/photon-api/src/models/token_balance.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenBalance { - #[serde(rename = "balance")] - pub balance: u64, - /// A Solana public key represented as a base58 string. - #[serde(rename = "mint")] - pub mint: String, -} - -impl TokenBalance { - pub fn new(balance: u64, mint: String) -> TokenBalance { - TokenBalance { balance, mint } - } -} diff --git a/sdk-libs/photon-api/src/models/token_balance_list.rs b/sdk-libs/photon-api/src/models/token_balance_list.rs deleted file mode 100644 index ca4241bbc3..0000000000 --- a/sdk-libs/photon-api/src/models/token_balance_list.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenBalanceList { - /// A base 58 encoded string. - #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "token_balances")] - pub token_balances: Vec, -} - -impl TokenBalanceList { - pub fn new(token_balances: Vec) -> TokenBalanceList { - TokenBalanceList { - cursor: None, - token_balances, - } - } -} diff --git a/sdk-libs/photon-api/src/models/token_balance_list_v2.rs b/sdk-libs/photon-api/src/models/token_balance_list_v2.rs deleted file mode 100644 index 8c31b5680f..0000000000 --- a/sdk-libs/photon-api/src/models/token_balance_list_v2.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenBalanceListV2 { - /// A base 58 encoded string. - #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(rename = "items")] - pub items: Vec, -} - -impl TokenBalanceListV2 { - pub fn new(items: Vec) -> TokenBalanceListV2 { - TokenBalanceListV2 { - cursor: None, - items, - } - } -} diff --git a/sdk-libs/photon-api/src/models/token_data.rs b/sdk-libs/photon-api/src/models/token_data.rs deleted file mode 100644 index 2cc5f1d795..0000000000 --- a/sdk-libs/photon-api/src/models/token_data.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TokenData { - #[serde(rename = "amount")] - pub amount: u64, - /// A Solana public key represented as a base58 string. - #[serde(rename = "delegate", skip_serializing_if = "Option::is_none")] - pub delegate: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "mint")] - pub mint: String, - /// A Solana public key represented as a base58 string. - #[serde(rename = "owner")] - pub owner: String, - #[serde(rename = "state")] - pub state: models::AccountState, - /// A base 64 encoded string. - #[serde(rename = "tlv", skip_serializing_if = "Option::is_none")] - pub tlv: Option, -} - -impl TokenData { - pub fn new(amount: u64, mint: String, owner: String, state: models::AccountState) -> TokenData { - TokenData { - amount, - delegate: None, - mint, - owner, - state, - tlv: None, - } - } -} diff --git a/sdk-libs/photon-api/src/models/tree_context_info.rs b/sdk-libs/photon-api/src/models/tree_context_info.rs deleted file mode 100644 index 90e6b04434..0000000000 --- a/sdk-libs/photon-api/src/models/tree_context_info.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.50.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TreeContextInfo { - /// A Solana public key represented as a base58 string. - #[serde(rename = "cpiContext", skip_serializing_if = "Option::is_none")] - pub cpi_context: Option, - /// A Solana public key represented as a base58 string. - #[serde(rename = "queue")] - pub queue: String, - /// A Solana public key represented as a base58 string. - #[serde(rename = "tree")] - pub tree: String, - #[serde(rename = "treeType")] - pub tree_type: u16, -} - -impl TreeContextInfo { - pub fn new(queue: String, tree: String, tree_type: u16) -> TreeContextInfo { - TreeContextInfo { - cpi_context: None, - queue, - tree, - tree_type, - } - } -} diff --git a/sdk-libs/photon-api/src/models/tree_info.rs b/sdk-libs/photon-api/src/models/tree_info.rs deleted file mode 100644 index 0a7f036b13..0000000000 --- a/sdk-libs/photon-api/src/models/tree_info.rs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * photon-indexer - * - * Solana indexer for general compression - * - * The version of the OpenAPI document: 0.51.0 - * - */ - -#[derive(Clone, Copy, Default, Debug, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[repr(u64)] -pub enum TreeType { - #[default] - #[serde(rename = "stateV1")] - StateV1 = 1, - #[serde(rename = "stateV2")] - StateV2 = 3, -} - -impl From for u64 { - fn from(value: TreeType) -> Self { - value as u64 - } -} - -impl From for TreeType { - fn from(value: u64) -> Self { - match value { - 1 => TreeType::StateV1, - 3 => TreeType::StateV2, - _ => TreeType::StateV1, - } - } -} - -/// TreeInfo : Merkle tree info for compressed accounts -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct TreeInfo { - pub tree: String, - pub queue: String, - #[serde(rename = "treeType")] - pub tree_type: TreeType, - #[serde(skip_serializing_if = "Option::is_none")] - pub seq: Option, - /// Slot when the account was created/compressed - #[serde(rename = "slotCreated")] - pub slot_created: u64, -} - -impl TreeInfo { - pub fn new(tree: String, queue: String, tree_type: TreeType, slot_created: u64) -> Self { - Self { - tree, - queue, - tree_type, - seq: None, - slot_created, - } - } -} diff --git a/xtask/src/create_batch_address_tree.rs b/xtask/src/create_batch_address_tree.rs index 1cde15c0c0..ffb39ef368 100644 --- a/xtask/src/create_batch_address_tree.rs +++ b/xtask/src/create_batch_address_tree.rs @@ -44,7 +44,6 @@ pub async fn create_batch_address_tree(options: Options) -> anyhow::Result<()> { photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await .unwrap(); diff --git a/xtask/src/create_batch_state_tree.rs b/xtask/src/create_batch_state_tree.rs index 7afb0b411b..0cf7810b71 100644 --- a/xtask/src/create_batch_state_tree.rs +++ b/xtask/src/create_batch_state_tree.rs @@ -49,7 +49,6 @@ pub async fn create_batch_state_tree(options: Options) -> anyhow::Result<()> { photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await .unwrap(); diff --git a/xtask/src/create_compressible_config.rs b/xtask/src/create_compressible_config.rs index f4e05b6020..0000d7ced5 100644 --- a/xtask/src/create_compressible_config.rs +++ b/xtask/src/create_compressible_config.rs @@ -123,7 +123,6 @@ pub async fn create_compressible_config(options: Options) -> anyhow::Result<()> photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await?; diff --git a/xtask/src/create_ctoken_account.rs b/xtask/src/create_ctoken_account.rs index 4e03c7250d..a4acf3a998 100644 --- a/xtask/src/create_ctoken_account.rs +++ b/xtask/src/create_ctoken_account.rs @@ -42,7 +42,6 @@ pub async fn create_ctoken_account(options: Options) -> anyhow::Result<()> { photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await?; diff --git a/xtask/src/create_state_tree.rs b/xtask/src/create_state_tree.rs index 326c7f4d1c..e1b8a7b733 100644 --- a/xtask/src/create_state_tree.rs +++ b/xtask/src/create_state_tree.rs @@ -49,7 +49,6 @@ pub async fn create_state_tree(options: Options) -> anyhow::Result<()> { photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await .unwrap(); diff --git a/xtask/src/create_update_protocol_config_ix.rs b/xtask/src/create_update_protocol_config_ix.rs index e91ac4fbb4..a2a136d541 100644 --- a/xtask/src/create_update_protocol_config_ix.rs +++ b/xtask/src/create_update_protocol_config_ix.rs @@ -37,7 +37,6 @@ pub async fn create_update_protocol_config_ix(options: Options) -> anyhow::Resul photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await .unwrap(); diff --git a/xtask/src/new_deployment.rs b/xtask/src/new_deployment.rs index 0d3a0c9723..7de66cea3a 100644 --- a/xtask/src/new_deployment.rs +++ b/xtask/src/new_deployment.rs @@ -59,7 +59,6 @@ pub async fn init_new_deployment(options: Options) -> anyhow::Result<()> { photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await .unwrap(); diff --git a/xtask/src/print_state_tree.rs b/xtask/src/print_state_tree.rs index 041d08d66c..c4f6a35c00 100644 --- a/xtask/src/print_state_tree.rs +++ b/xtask/src/print_state_tree.rs @@ -32,7 +32,6 @@ pub async fn print_state_tree(options: Options) -> anyhow::Result<()> { photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await?; diff --git a/xtask/src/reinit_cpi_accounts.rs b/xtask/src/reinit_cpi_accounts.rs index 21883aa77d..276a43c1e6 100644 --- a/xtask/src/reinit_cpi_accounts.rs +++ b/xtask/src/reinit_cpi_accounts.rs @@ -58,7 +58,6 @@ pub async fn reinit_cpi_accounts(options: Options) -> anyhow::Result<()> { photon_url: None, commitment_config: None, fetch_active_tree: false, - api_key: None, }) .await?;