From 464e72fc29b94999983cd5e088c7d453a310b628 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Wed, 7 Aug 2024 16:16:28 -0500 Subject: [PATCH 1/3] solana: update to 2.0.4 --- CHANGELOG.md | 11 ++++ Cargo.lock | 72 +++++++++++++-------------- Cargo.toml | 24 ++++----- yellowstone-grpc-client/Cargo.toml | 2 +- yellowstone-grpc-geyser/Cargo.toml | 2 +- yellowstone-grpc-geyser/src/grpc.rs | 18 ++++--- yellowstone-grpc-geyser/src/plugin.rs | 5 +- yellowstone-grpc-proto/Cargo.toml | 2 +- yellowstone-grpc-tools/Cargo.toml | 2 +- 9 files changed, 79 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d85d2b44..f9f8f05a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,17 @@ The minor version will be incremented upon a breaking change and the patch versi ### Breaking +## 2024-08-07 + +- yellowstone-grpc-client-1.16.0+solana.2.0.4 +- yellowstone-grpc-geyser-1.16.0+solana.2.0.4 +- yellowstone-grpc-proto-1.15.0+solana.2.0.4 +- yellowstone-grpc-tools-1.0.0-rc.12+solana.2.0.4 + +### Features + +- solana: update to 2.0.4 ([#390](https://github.com/rpcpool/yellowstone-grpc/pull/390)) + ## 2024-07-12 - yellowstone-grpc-client-1.16.0+solana.2.0.2 diff --git a/Cargo.lock b/Cargo.lock index d432fdc1..3d37b104 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "agave-geyser-plugin-interface" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff29780f41eb844d03dd7e8bf5b221691753805474fdb0d02b11a215139ac4a" +checksum = "9ec0a01aa29dc567f787d502fe24d2d15891eb311398a2022305786ba4c20e3e" dependencies = [ "log", "solana-sdk", @@ -3491,9 +3491,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0d523cdad11e0b9d1318d6801860e5b295086b34ab5625126f91035b18c3a2" +checksum = "8a919e80186d23cc4cda95ce7d11d895edf06ac31d56ab44eafb8b22a44c5015" dependencies = [ "Inflector", "base64 0.22.1", @@ -3516,9 +3516,9 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff38c72013ff65fb7d17770240feee432217bb73de68c4e1521d715cb0df274" +checksum = "af98c3bec3b3c8581ca6f92662e71442f763623044722a311eaa177ab4e9d370" dependencies = [ "rustc_version", "solana-sdk", @@ -3526,9 +3526,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066928ca504549466522b7be6ab91fde61d138e5ecfb2b19a401948de33dfa2a" +checksum = "c4c5011c9b46bef0174c048bf3acaf93b97b3d08ec23f7c0c452cdfffeb2c0b1" dependencies = [ "bincode", "chrono", @@ -3540,9 +3540,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e4796ea1c84c8ed80023ab93f03aaeca1a968120b13074233ced4abddb3c2" +checksum = "7a7a7e9bc903aa73b077e6c26d2871ef8a28b5c7914adb405d56106fbe6e2e09" dependencies = [ "bytemuck", "bytemuck_derive", @@ -3553,9 +3553,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024c7ae864a5217198bfcc1823914ee63f96f154f75d7f590ad3e02b3cb2e3a4" +checksum = "a13451d8cf9e6f07075d3463a52cf582f26721572c7c116619df8f644b086c3c" dependencies = [ "env_logger 0.9.3", "lazy_static", @@ -3564,9 +3564,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909dc71f8ab17dc8d6b14ab772497a32845b2e56cb2b003d6f0141f3ea48cf5c" +checksum = "37a30cf602267aa8db1bc22c8f69621ff9eec707407167a9566d6b845494b658" dependencies = [ "log", "solana-sdk", @@ -3574,9 +3574,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4129101a4864ed9a6ab4838c4bdf69010166ae6a0f1e00994b14f2cbba97ec2" +checksum = "8a2de421155828699e15794ad4eb14edf50192e25e73648f0d8ae41826d4169e" dependencies = [ "crossbeam-channel", "gethostname", @@ -3589,9 +3589,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46779502637be111d121691aace200175ec1a57643f9760a36450b52d4eccdfd" +checksum = "3c75b255c34423a56d35bf695ada268d15112f782771f2a0ad12f28b5fb07cd3" dependencies = [ "ark-bn254", "ark-ec", @@ -3635,9 +3635,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851845bee4a60dbb78e74ff9c40f3d3a4bf2f22db1245cc7d77ca198f383abce" +checksum = "92cb880a1b9ab10f1dfb3455f4cfc5f37f9a99e3a1c29dd01105100bda16f65f" dependencies = [ "base64 0.22.1", "bincode", @@ -3664,9 +3664,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469540c1313ec2887fc9547d9723955e3a92433593ed910892aa59ac347e5db1" +checksum = "37f55b64bb1a3f4b4d83a880933ff3d08a6d5857e5db481fec183df45ab58dad" dependencies = [ "bincode", "bitflags 2.6.0", @@ -3713,9 +3713,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa59130529bdfa2df945762785ea6c887cc07c901f52eb67ea4dfaa9e0b9c60b" +checksum = "e6073cfb240aa571f11511ea3add3a699a44e7e80c696b34b30a6fc126827c9f" dependencies = [ "bs58", "proc-macro2", @@ -3732,9 +3732,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-transaction-status" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be0ae1fe14d6375bb798e3f171ad89044b06030884323b27e789f1db2a553f6" +checksum = "fbb97183f3033bfad0e31e9d078add9272f3771a4641b1eb2e384955e98f4c5a" dependencies = [ "Inflector", "base64 0.22.1", @@ -3759,9 +3759,9 @@ dependencies = [ [[package]] name = "solana-type-overrides" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68c0993feb343a389053226596c94e9f42c0dbf8685bfe98304e53e4848ff7de" +checksum = "bc7267be5ef0ca824929e2632b82c07fde7056ae5d0481a87fb7223978f3c4eb" dependencies = [ "lazy_static", "rand 0.8.5", @@ -3769,9 +3769,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e647b3cbfc63a1fc9e6daadcb54c328683ccce831c78de5ef7d4553af449b317" +checksum = "0dc534f8cd9fe254ae1729f762bde773c4c3f6cc364b87798b2e46d7dfbe6763" dependencies = [ "itertools 0.12.1", "log", @@ -3784,9 +3784,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6530de68b612de86ed7dcffa9e4049f45a1538ce7a87c58007b5d54095fc808b" +checksum = "f4da78911f3d5a393bd6ef54f2f6301c0153b3c61e17d514e692fb9b83263422" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -5041,7 +5041,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-client" -version = "1.16.0+solana.2.0.2" +version = "1.16.0+solana.2.0.4" dependencies = [ "bytes", "futures", @@ -5077,7 +5077,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-geyser" -version = "1.16.0+solana.2.0.2" +version = "1.16.0+solana.2.0.4" dependencies = [ "agave-geyser-plugin-interface", "anyhow", @@ -5110,7 +5110,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-proto" -version = "1.15.0+solana.2.0.2" +version = "1.15.0+solana.2.0.4" dependencies = [ "anyhow", "bincode", @@ -5125,7 +5125,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-tools" -version = "1.0.0-rc.12+solana.2.0.2" +version = "1.0.0-rc.12+solana.2.0.4" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 2c8e0429..e2700b56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [workspace] resolver = "2" members = [ - "examples/rust", # 1.14.0+solana.2.0.2 - "yellowstone-grpc-client", # 1.16.0+solana.2.0.2 - "yellowstone-grpc-geyser", # 1.16.0+solana.2.0.2 - "yellowstone-grpc-proto", # 1.15.0+solana.2.0.2 - "yellowstone-grpc-tools", # 1.0.0-rc.12+solana.2.0.2 + "examples/rust", # 1.14.0+solana.2.0.4 + "yellowstone-grpc-client", # 1.16.0+solana.2.0.4 + "yellowstone-grpc-geyser", # 1.16.0+solana.2.0.4 + "yellowstone-grpc-proto", # 1.15.0+solana.2.0.4 + "yellowstone-grpc-tools", # 1.0.0-rc.12+solana.2.0.4 ] [workspace.package] @@ -17,7 +17,7 @@ license = "AGPL-3.0" keywords = ["solana"] [workspace.dependencies] -agave-geyser-plugin-interface = "=2.0.2" +agave-geyser-plugin-interface = "=2.0.4" anyhow = "1.0.62" async-trait = "0.1.73" atty = "0.2.14" @@ -54,10 +54,10 @@ serde = "1.0.145" serde_json = "1.0.86" serde_yaml = "0.9.25" sha2 = "0.10.7" -solana-account-decoder = "=2.0.2" -solana-logger = "=2.0.2" -solana-sdk = "=2.0.2" -solana-transaction-status = "=2.0.2" +solana-account-decoder = "=2.0.4" +solana-logger = "=2.0.4" +solana-sdk = "=2.0.4" +solana-transaction-status = "=2.0.4" spl-token-2022 = "4.0.0" thiserror = "1.0" tokio = "1.21.2" @@ -69,8 +69,8 @@ tracing = "0.1.37" tracing-subscriber = "0.3.17" uuid = "1.8.0" vergen = "9.0.0" -yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "=1.16.0+solana.2.0.2" } -yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "=1.15.0+solana.2.0.2", default-features = false } +yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "=1.16.0+solana.2.0.4" } +yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "=1.15.0+solana.2.0.4", default-features = false } [profile.release] lto = true diff --git a/yellowstone-grpc-client/Cargo.toml b/yellowstone-grpc-client/Cargo.toml index 2ce0999c..65b4650d 100644 --- a/yellowstone-grpc-client/Cargo.toml +++ b/yellowstone-grpc-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-client" -version = "1.16.0+solana.2.0.2" +version = "1.16.0+solana.2.0.4" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Simple Client" diff --git a/yellowstone-grpc-geyser/Cargo.toml b/yellowstone-grpc-geyser/Cargo.toml index 9481b9ea..da759cb5 100644 --- a/yellowstone-grpc-geyser/Cargo.toml +++ b/yellowstone-grpc-geyser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-geyser" -version = "1.16.0+solana.2.0.2" +version = "1.16.0+solana.2.0.4" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Plugin" diff --git a/yellowstone-grpc-geyser/src/grpc.rs b/yellowstone-grpc-geyser/src/grpc.rs index b18775b6..a86c3e24 100644 --- a/yellowstone-grpc-geyser/src/grpc.rs +++ b/yellowstone-grpc-geyser/src/grpc.rs @@ -6,7 +6,7 @@ use { version::GrpcVersionInfo, }, agave_geyser_plugin_interface::geyser_plugin_interface::{ - ReplicaAccountInfoV3, ReplicaBlockInfoV3, ReplicaEntryInfoV2, ReplicaTransactionInfoV2, + ReplicaAccountInfoV3, ReplicaBlockInfoV4, ReplicaEntryInfoV2, ReplicaTransactionInfoV2, SlotStatus, }, anyhow::Context, @@ -235,6 +235,7 @@ pub struct MessageBlock { pub parent_blockhash: String, pub blockhash: String, pub rewards: Vec, + pub num_partitions: Option, pub block_time: Option, pub block_height: Option, pub executed_transaction_count: u64, @@ -267,6 +268,7 @@ impl blockhash: blockinfo.blockhash, parent_blockhash: blockinfo.parent_blockhash, rewards: blockinfo.rewards, + num_partitions: blockinfo.num_partitions, block_time: blockinfo.block_time, block_height: blockinfo.block_height, executed_transaction_count: blockinfo.executed_transaction_count, @@ -286,20 +288,22 @@ pub struct MessageBlockMeta { pub parent_blockhash: String, pub blockhash: String, pub rewards: Vec, + pub num_partitions: Option, pub block_time: Option, pub block_height: Option, pub executed_transaction_count: u64, pub entries_count: u64, } -impl<'a> From<&'a ReplicaBlockInfoV3<'a>> for MessageBlockMeta { - fn from(blockinfo: &'a ReplicaBlockInfoV3<'a>) -> Self { +impl<'a> From<&'a ReplicaBlockInfoV4<'a>> for MessageBlockMeta { + fn from(blockinfo: &'a ReplicaBlockInfoV4<'a>) -> Self { Self { parent_slot: blockinfo.parent_slot, slot: blockinfo.slot, parent_blockhash: blockinfo.parent_blockhash.to_string(), blockhash: blockinfo.blockhash.to_string(), - rewards: blockinfo.rewards.into(), + rewards: blockinfo.rewards.rewards.clone(), + num_partitions: blockinfo.rewards.num_partitions, block_time: blockinfo.block_time, block_height: blockinfo.block_height, executed_transaction_count: blockinfo.executed_transaction_count, @@ -350,6 +354,7 @@ pub struct MessageBlockRef<'a> { pub parent_blockhash: &'a String, pub blockhash: &'a String, pub rewards: &'a Vec, + pub num_partitions: Option, pub block_time: Option, pub block_height: Option, pub executed_transaction_count: u64, @@ -382,6 +387,7 @@ impl<'a> parent_blockhash: &block.parent_blockhash, blockhash: &block.blockhash, rewards: &block.rewards, + num_partitions: block.num_partitions, block_time: block.block_time, block_height: block.block_height, executed_transaction_count: block.executed_transaction_count, @@ -444,7 +450,7 @@ impl<'a> MessageRef<'a> { blockhash: message.blockhash.clone(), rewards: Some(convert_to::create_rewards_obj( message.rewards.as_slice(), - None, + message.num_partitions, )), block_time: message.block_time.map(convert_to::create_timestamp), block_height: message.block_height.map(convert_to::create_block_height), @@ -474,7 +480,7 @@ impl<'a> MessageRef<'a> { blockhash: message.blockhash.clone(), rewards: Some(convert_to::create_rewards_obj( message.rewards.as_slice(), - None, + message.num_partitions, )), block_time: message.block_time.map(convert_to::create_timestamp), block_height: message.block_height.map(convert_to::create_block_height), diff --git a/yellowstone-grpc-geyser/src/plugin.rs b/yellowstone-grpc-geyser/src/plugin.rs index 254da3d8..c1901f56 100644 --- a/yellowstone-grpc-geyser/src/plugin.rs +++ b/yellowstone-grpc-geyser/src/plugin.rs @@ -215,7 +215,10 @@ impl GeyserPlugin for Plugin { ReplicaBlockInfoVersions::V0_0_2(_info) => { unreachable!("ReplicaBlockInfoVersions::V0_0_2 is not supported") } - ReplicaBlockInfoVersions::V0_0_3(info) => info, + ReplicaBlockInfoVersions::V0_0_3(_info) => { + unreachable!("ReplicaBlockInfoVersions::V0_0_3 is not supported") + } + ReplicaBlockInfoVersions::V0_0_4(info) => info, }; let message = Message::BlockMeta(blockinfo.into()); diff --git a/yellowstone-grpc-proto/Cargo.toml b/yellowstone-grpc-proto/Cargo.toml index fe58d480..4bb9cb9e 100644 --- a/yellowstone-grpc-proto/Cargo.toml +++ b/yellowstone-grpc-proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-proto" -version = "1.15.0+solana.2.0.2" +version = "1.15.0+solana.2.0.4" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Protobuf Definitions" diff --git a/yellowstone-grpc-tools/Cargo.toml b/yellowstone-grpc-tools/Cargo.toml index d1413e72..ff2fd8ba 100644 --- a/yellowstone-grpc-tools/Cargo.toml +++ b/yellowstone-grpc-tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-tools" -version = "1.0.0-rc.12+solana.2.0.2" +version = "1.0.0-rc.12+solana.2.0.4" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Tools" From 7aaa6c2389c87d363b4eea6caa6856fd184b5fe1 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Wed, 7 Aug 2024 16:24:34 -0500 Subject: [PATCH 2/3] go: update --- examples/golang/proto/geyser.pb.go | 13 +- examples/golang/proto/geyser_grpc.pb.go | 126 +++-- examples/golang/proto/solana-storage.pb.go | 563 ++++++++++++--------- 3 files changed, 393 insertions(+), 309 deletions(-) diff --git a/examples/golang/proto/geyser.pb.go b/examples/golang/proto/geyser.pb.go index bb97b94d..8511849a 100644 --- a/examples/golang/proto/geyser.pb.go +++ b/examples/golang/proto/geyser.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v3.19.6 // source: geyser.proto @@ -2960,11 +2960,12 @@ var file_geyser_proto_rawDesc = []byte{ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x79, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x79, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x34, 0x5a, - 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x70, 0x63, 0x70, - 0x6f, 0x6f, 0x6c, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2d, 0x67, 0x65, 0x79, 0x73, 0x65, - 0x72, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3b, 0x5a, + 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x70, 0x63, 0x70, + 0x6f, 0x6f, 0x6c, 0x2f, 0x79, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2d, + 0x67, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/examples/golang/proto/geyser_grpc.pb.go b/examples/golang/proto/geyser_grpc.pb.go index a7b7c92b..79f0dfac 100644 --- a/examples/golang/proto/geyser_grpc.pb.go +++ b/examples/golang/proto/geyser_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc v3.19.6 // source: geyser.proto @@ -15,14 +15,24 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Geyser_Subscribe_FullMethodName = "/geyser.Geyser/Subscribe" + Geyser_Ping_FullMethodName = "/geyser.Geyser/Ping" + Geyser_GetLatestBlockhash_FullMethodName = "/geyser.Geyser/GetLatestBlockhash" + Geyser_GetBlockHeight_FullMethodName = "/geyser.Geyser/GetBlockHeight" + Geyser_GetSlot_FullMethodName = "/geyser.Geyser/GetSlot" + Geyser_IsBlockhashValid_FullMethodName = "/geyser.Geyser/IsBlockhashValid" + Geyser_GetVersion_FullMethodName = "/geyser.Geyser/GetVersion" +) // GeyserClient is the client API for Geyser service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type GeyserClient interface { - Subscribe(ctx context.Context, opts ...grpc.CallOption) (Geyser_SubscribeClient, error) + Subscribe(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SubscribeRequest, SubscribeUpdate], error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) GetLatestBlockhash(ctx context.Context, in *GetLatestBlockhashRequest, opts ...grpc.CallOption) (*GetLatestBlockhashResponse, error) GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) @@ -39,40 +49,23 @@ func NewGeyserClient(cc grpc.ClientConnInterface) GeyserClient { return &geyserClient{cc} } -func (c *geyserClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (Geyser_SubscribeClient, error) { - stream, err := c.cc.NewStream(ctx, &Geyser_ServiceDesc.Streams[0], "/geyser.Geyser/Subscribe", opts...) +func (c *geyserClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SubscribeRequest, SubscribeUpdate], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Geyser_ServiceDesc.Streams[0], Geyser_Subscribe_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &geyserSubscribeClient{stream} + x := &grpc.GenericClientStream[SubscribeRequest, SubscribeUpdate]{ClientStream: stream} return x, nil } -type Geyser_SubscribeClient interface { - Send(*SubscribeRequest) error - Recv() (*SubscribeUpdate, error) - grpc.ClientStream -} - -type geyserSubscribeClient struct { - grpc.ClientStream -} - -func (x *geyserSubscribeClient) Send(m *SubscribeRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *geyserSubscribeClient) Recv() (*SubscribeUpdate, error) { - m := new(SubscribeUpdate) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Geyser_SubscribeClient = grpc.BidiStreamingClient[SubscribeRequest, SubscribeUpdate] func (c *geyserClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PongResponse) - err := c.cc.Invoke(ctx, "/geyser.Geyser/Ping", in, out, opts...) + err := c.cc.Invoke(ctx, Geyser_Ping_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -80,8 +73,9 @@ func (c *geyserClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.C } func (c *geyserClient) GetLatestBlockhash(ctx context.Context, in *GetLatestBlockhashRequest, opts ...grpc.CallOption) (*GetLatestBlockhashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLatestBlockhashResponse) - err := c.cc.Invoke(ctx, "/geyser.Geyser/GetLatestBlockhash", in, out, opts...) + err := c.cc.Invoke(ctx, Geyser_GetLatestBlockhash_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -89,8 +83,9 @@ func (c *geyserClient) GetLatestBlockhash(ctx context.Context, in *GetLatestBloc } func (c *geyserClient) GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBlockHeightResponse) - err := c.cc.Invoke(ctx, "/geyser.Geyser/GetBlockHeight", in, out, opts...) + err := c.cc.Invoke(ctx, Geyser_GetBlockHeight_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -98,8 +93,9 @@ func (c *geyserClient) GetBlockHeight(ctx context.Context, in *GetBlockHeightReq } func (c *geyserClient) GetSlot(ctx context.Context, in *GetSlotRequest, opts ...grpc.CallOption) (*GetSlotResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetSlotResponse) - err := c.cc.Invoke(ctx, "/geyser.Geyser/GetSlot", in, out, opts...) + err := c.cc.Invoke(ctx, Geyser_GetSlot_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -107,8 +103,9 @@ func (c *geyserClient) GetSlot(ctx context.Context, in *GetSlotRequest, opts ... } func (c *geyserClient) IsBlockhashValid(ctx context.Context, in *IsBlockhashValidRequest, opts ...grpc.CallOption) (*IsBlockhashValidResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(IsBlockhashValidResponse) - err := c.cc.Invoke(ctx, "/geyser.Geyser/IsBlockhashValid", in, out, opts...) + err := c.cc.Invoke(ctx, Geyser_IsBlockhashValid_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -116,8 +113,9 @@ func (c *geyserClient) IsBlockhashValid(ctx context.Context, in *IsBlockhashVali } func (c *geyserClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetVersionResponse) - err := c.cc.Invoke(ctx, "/geyser.Geyser/GetVersion", in, out, opts...) + err := c.cc.Invoke(ctx, Geyser_GetVersion_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -126,9 +124,9 @@ func (c *geyserClient) GetVersion(ctx context.Context, in *GetVersionRequest, op // GeyserServer is the server API for Geyser service. // All implementations must embed UnimplementedGeyserServer -// for forward compatibility +// for forward compatibility. type GeyserServer interface { - Subscribe(Geyser_SubscribeServer) error + Subscribe(grpc.BidiStreamingServer[SubscribeRequest, SubscribeUpdate]) error Ping(context.Context, *PingRequest) (*PongResponse, error) GetLatestBlockhash(context.Context, *GetLatestBlockhashRequest) (*GetLatestBlockhashResponse, error) GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error) @@ -138,11 +136,14 @@ type GeyserServer interface { mustEmbedUnimplementedGeyserServer() } -// UnimplementedGeyserServer must be embedded to have forward compatible implementations. -type UnimplementedGeyserServer struct { -} +// UnimplementedGeyserServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedGeyserServer struct{} -func (UnimplementedGeyserServer) Subscribe(Geyser_SubscribeServer) error { +func (UnimplementedGeyserServer) Subscribe(grpc.BidiStreamingServer[SubscribeRequest, SubscribeUpdate]) error { return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } func (UnimplementedGeyserServer) Ping(context.Context, *PingRequest) (*PongResponse, error) { @@ -164,6 +165,7 @@ func (UnimplementedGeyserServer) GetVersion(context.Context, *GetVersionRequest) return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") } func (UnimplementedGeyserServer) mustEmbedUnimplementedGeyserServer() {} +func (UnimplementedGeyserServer) testEmbeddedByValue() {} // UnsafeGeyserServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GeyserServer will @@ -173,34 +175,22 @@ type UnsafeGeyserServer interface { } func RegisterGeyserServer(s grpc.ServiceRegistrar, srv GeyserServer) { + // If the following call pancis, it indicates UnimplementedGeyserServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Geyser_ServiceDesc, srv) } func _Geyser_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(GeyserServer).Subscribe(&geyserSubscribeServer{stream}) -} - -type Geyser_SubscribeServer interface { - Send(*SubscribeUpdate) error - Recv() (*SubscribeRequest, error) - grpc.ServerStream -} - -type geyserSubscribeServer struct { - grpc.ServerStream + return srv.(GeyserServer).Subscribe(&grpc.GenericServerStream[SubscribeRequest, SubscribeUpdate]{ServerStream: stream}) } -func (x *geyserSubscribeServer) Send(m *SubscribeUpdate) error { - return x.ServerStream.SendMsg(m) -} - -func (x *geyserSubscribeServer) Recv() (*SubscribeRequest, error) { - m := new(SubscribeRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Geyser_SubscribeServer = grpc.BidiStreamingServer[SubscribeRequest, SubscribeUpdate] func _Geyser_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PingRequest) @@ -212,7 +202,7 @@ func _Geyser_Ping_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/geyser.Geyser/Ping", + FullMethod: Geyser_Ping_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GeyserServer).Ping(ctx, req.(*PingRequest)) @@ -230,7 +220,7 @@ func _Geyser_GetLatestBlockhash_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/geyser.Geyser/GetLatestBlockhash", + FullMethod: Geyser_GetLatestBlockhash_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GeyserServer).GetLatestBlockhash(ctx, req.(*GetLatestBlockhashRequest)) @@ -248,7 +238,7 @@ func _Geyser_GetBlockHeight_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/geyser.Geyser/GetBlockHeight", + FullMethod: Geyser_GetBlockHeight_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GeyserServer).GetBlockHeight(ctx, req.(*GetBlockHeightRequest)) @@ -266,7 +256,7 @@ func _Geyser_GetSlot_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/geyser.Geyser/GetSlot", + FullMethod: Geyser_GetSlot_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GeyserServer).GetSlot(ctx, req.(*GetSlotRequest)) @@ -284,7 +274,7 @@ func _Geyser_IsBlockhashValid_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/geyser.Geyser/IsBlockhashValid", + FullMethod: Geyser_IsBlockhashValid_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GeyserServer).IsBlockhashValid(ctx, req.(*IsBlockhashValidRequest)) @@ -302,7 +292,7 @@ func _Geyser_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/geyser.Geyser/GetVersion", + FullMethod: Geyser_GetVersion_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GeyserServer).GetVersion(ctx, req.(*GetVersionRequest)) diff --git a/examples/golang/proto/solana-storage.pb.go b/examples/golang/proto/solana-storage.pb.go index a6f02fff..b951f408 100644 --- a/examples/golang/proto/solana-storage.pb.go +++ b/examples/golang/proto/solana-storage.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v3.19.6 // source: solana-storage.proto @@ -87,6 +87,7 @@ type ConfirmedBlock struct { Rewards []*Reward `protobuf:"bytes,5,rep,name=rewards,proto3" json:"rewards,omitempty"` BlockTime *UnixTimestamp `protobuf:"bytes,6,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` BlockHeight *BlockHeight `protobuf:"bytes,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + NumPartitions *NumPartitions `protobuf:"bytes,8,opt,name=num_partitions,json=numPartitions,proto3" json:"num_partitions,omitempty"` } func (x *ConfirmedBlock) Reset() { @@ -170,6 +171,13 @@ func (x *ConfirmedBlock) GetBlockHeight() *BlockHeight { return nil } +func (x *ConfirmedBlock) GetNumPartitions() *NumPartitions { + if x != nil { + return x.NumPartitions + } + return nil +} + type ConfirmedTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1191,7 +1199,8 @@ type Rewards struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Rewards []*Reward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` + Rewards []*Reward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` + NumPartitions *NumPartitions `protobuf:"bytes,2,opt,name=num_partitions,json=numPartitions,proto3" json:"num_partitions,omitempty"` } func (x *Rewards) Reset() { @@ -1233,6 +1242,13 @@ func (x *Rewards) GetRewards() []*Reward { return nil } +func (x *Rewards) GetNumPartitions() *NumPartitions { + if x != nil { + return x.NumPartitions + } + return nil +} + type UnixTimestamp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1327,13 +1343,60 @@ func (x *BlockHeight) GetBlockHeight() uint64 { return 0 } +type NumPartitions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NumPartitions uint64 `protobuf:"varint,1,opt,name=num_partitions,json=numPartitions,proto3" json:"num_partitions,omitempty"` +} + +func (x *NumPartitions) Reset() { + *x = NumPartitions{} + if protoimpl.UnsafeEnabled { + mi := &file_solana_storage_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NumPartitions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NumPartitions) ProtoMessage() {} + +func (x *NumPartitions) ProtoReflect() protoreflect.Message { + mi := &file_solana_storage_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NumPartitions.ProtoReflect.Descriptor instead. +func (*NumPartitions) Descriptor() ([]byte, []int) { + return file_solana_storage_proto_rawDescGZIP(), []int{18} +} + +func (x *NumPartitions) GetNumPartitions() uint64 { + if x != nil { + return x.NumPartitions + } + return 0 +} + var File_solana_storage_proto protoreflect.FileDescriptor var file_solana_storage_proto_rawDesc = []byte{ 0x0a, 0x14, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0xb4, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x89, 0x04, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x42, 0x6c, @@ -1360,220 +1423,235 @@ var file_solana_storage_proto_rawDesc = []byte{ 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, - 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xae, 0x01, 0x0a, - 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x6c, - 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x34, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x6f, 0x0a, - 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, - 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x81, - 0x03, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x6c, - 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, - 0x65, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x56, - 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, + 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x53, 0x0a, 0x0e, + 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x49, 0x6e, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x64, 0x12, 0x6c, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x13, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x1c, - 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x19, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x43, 0x0a, - 0x1e, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x75, 0x6e, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1b, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x61, 0x64, 0x6f, 0x6e, - 0x6c, 0x79, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4b, 0x65, - 0x79, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x77, 0x72, 0x69, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, - 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, 0xd9, 0x07, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, 0x74, - 0x61, 0x12, 0x41, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, - 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x03, 0x65, 0x72, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x5f, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0b, 0x70, 0x72, - 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x73, - 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04, - 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x5f, - 0x0a, 0x12, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x6f, 0x6c, - 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, - 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x69, 0x6e, - 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x36, 0x0a, 0x17, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x15, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x4e, 0x6f, 0x6e, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x5f, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6c, - 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x6f, - 0x67, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x6e, 0x6f, 0x6e, 0x65, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x4e, 0x6f, 0x6e, 0x65, 0x12, 0x59, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4e, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xae, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, + 0x74, 0x61, 0x22, 0x6f, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x10, 0x70, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x12, 0x5b, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, - 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x70, 0x6f, 0x73, - 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x3f, - 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x63, 0x6b, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0x81, 0x03, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x44, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, - 0x3a, 0x0a, 0x19, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, - 0x28, 0x0c, 0x52, 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, - 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x17, - 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, - 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x6f, 0x6e, 0x65, 0x12, 0x39, 0x0a, - 0x16, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, - 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6d, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x63, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6d, 0x65, 0x64, 0x22, 0x24, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x7e, 0x0a, 0x11, 0x49, 0x6e, 0x6e, - 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x53, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x6f, 0x6c, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, + 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x68, + 0x61, 0x73, 0x68, 0x12, 0x56, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x73, 0x6f, 0x6c, 0x61, + 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x12, 0x6c, 0x0a, 0x15, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, + 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x52, 0x13, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x6e, 0x75, 0x6d, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6e, 0x75, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, + 0x79, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x19, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x61, 0x64, + 0x6f, 0x6e, 0x6c, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x12, 0x43, 0x0a, 0x1e, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, + 0x6c, 0x79, 0x5f, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1b, 0x6e, 0x75, 0x6d, 0x52, + 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0f, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, + 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x61, + 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, 0xd9, 0x07, 0x0a, + 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x72, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x04, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x12, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x11, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6e, 0x6f, 0x6e, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4e, 0x6f, 0x6e, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x6c, 0x6f, 0x67, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, + 0x2a, 0x0a, 0x11, 0x6c, 0x6f, 0x67, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, + 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x4e, 0x6f, 0x6e, 0x65, 0x12, 0x59, 0x0a, 0x12, 0x70, + 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x10, 0x70, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x11, 0x70, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x77, + 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x57, + 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, + 0x6e, 0x6c, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, 0x61, 0x64, 0x6f, + 0x6e, 0x6c, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0b, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x72, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x6f, + 0x6e, 0x65, 0x12, 0x39, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x75, 0x6e, + 0x69, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x55, 0x6e, 0x69, + 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, + 0x17, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x5f, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x22, 0x24, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x7e, + 0x0a, 0x11, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x53, 0x0a, 0x0c, 0x69, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa5, + 0x01, 0x0a, 0x10, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, + 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x49, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, + 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, + 0x0c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x6f, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, + 0x10, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x49, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd2, 0x01, 0x0a, 0x0c, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, + 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x69, 0x6e, + 0x74, 0x12, 0x54, 0x0a, 0x0f, 0x75, 0x69, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, - 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, 0x6e, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x10, 0x49, 0x6e, - 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, - 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x49, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x0b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, - 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x22, 0x6f, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x49, 0x6e, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x49, 0x64, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0xd2, 0x01, 0x0a, 0x0c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x0f, - 0x75, 0x69, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, + 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x55, 0x69, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0d, 0x75, 0x69, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x49, 0x64, 0x22, 0x8a, 0x01, 0x0a, + 0x0d, 0x55, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x75, 0x69, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x08, 0x75, 0x69, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, + 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x64, + 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x28, 0x0a, 0x10, 0x75, 0x69, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x69, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x3f, 0x0a, 0x0a, 0x52, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcb, 0x01, 0x0a, 0x06, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, + 0x08, 0x6c, 0x61, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x6c, 0x61, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x73, + 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0b, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x29, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x9f, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x55, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x0d, 0x75, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x49, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x0d, 0x55, 0x69, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x69, 0x5f, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x75, 0x69, - 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, - 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, - 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x69, - 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x69, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x22, 0x3f, 0x0a, 0x0a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x49, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcb, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6d, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x6d, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x70, 0x6f, 0x73, 0x74, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x73, - 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x07, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x3f, - 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, - 0x2d, 0x0a, 0x0d, 0x55, 0x6e, 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x30, - 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x2a, 0x49, 0x0a, 0x0a, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, - 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x07, 0x0a, 0x03, 0x46, 0x65, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x65, 0x6e, 0x74, - 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x12, - 0x0a, 0x0a, 0x06, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x42, 0x34, 0x5a, 0x32, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x70, 0x63, 0x70, 0x6f, 0x6f, - 0x6c, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2d, 0x67, 0x65, 0x79, 0x73, 0x65, 0x72, 0x2d, - 0x67, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x53, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4e, 0x75, + 0x6d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x6e, 0x75, 0x6d, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2d, 0x0a, 0x0d, 0x55, 0x6e, + 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x30, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x36, 0x0a, 0x0d, 0x4e, + 0x75, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, + 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2a, 0x49, 0x0a, 0x0a, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x65, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52, + 0x65, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x42, 0x3b, + 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x70, 0x63, + 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x79, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x74, 0x6f, 0x6e, 0x65, + 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1589,7 +1667,7 @@ func file_solana_storage_proto_rawDescGZIP() []byte { } var file_solana_storage_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_solana_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_solana_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_solana_storage_proto_goTypes = []interface{}{ (RewardType)(0), // 0: solana.storage.ConfirmedBlock.RewardType (*ConfirmedBlock)(nil), // 1: solana.storage.ConfirmedBlock.ConfirmedBlock @@ -1610,33 +1688,36 @@ var file_solana_storage_proto_goTypes = []interface{}{ (*Rewards)(nil), // 16: solana.storage.ConfirmedBlock.Rewards (*UnixTimestamp)(nil), // 17: solana.storage.ConfirmedBlock.UnixTimestamp (*BlockHeight)(nil), // 18: solana.storage.ConfirmedBlock.BlockHeight + (*NumPartitions)(nil), // 19: solana.storage.ConfirmedBlock.NumPartitions } var file_solana_storage_proto_depIdxs = []int32{ 2, // 0: solana.storage.ConfirmedBlock.ConfirmedBlock.transactions:type_name -> solana.storage.ConfirmedBlock.ConfirmedTransaction 15, // 1: solana.storage.ConfirmedBlock.ConfirmedBlock.rewards:type_name -> solana.storage.ConfirmedBlock.Reward 17, // 2: solana.storage.ConfirmedBlock.ConfirmedBlock.block_time:type_name -> solana.storage.ConfirmedBlock.UnixTimestamp 18, // 3: solana.storage.ConfirmedBlock.ConfirmedBlock.block_height:type_name -> solana.storage.ConfirmedBlock.BlockHeight - 3, // 4: solana.storage.ConfirmedBlock.ConfirmedTransaction.transaction:type_name -> solana.storage.ConfirmedBlock.Transaction - 7, // 5: solana.storage.ConfirmedBlock.ConfirmedTransaction.meta:type_name -> solana.storage.ConfirmedBlock.TransactionStatusMeta - 4, // 6: solana.storage.ConfirmedBlock.Transaction.message:type_name -> solana.storage.ConfirmedBlock.Message - 5, // 7: solana.storage.ConfirmedBlock.Message.header:type_name -> solana.storage.ConfirmedBlock.MessageHeader - 11, // 8: solana.storage.ConfirmedBlock.Message.instructions:type_name -> solana.storage.ConfirmedBlock.CompiledInstruction - 6, // 9: solana.storage.ConfirmedBlock.Message.address_table_lookups:type_name -> solana.storage.ConfirmedBlock.MessageAddressTableLookup - 8, // 10: solana.storage.ConfirmedBlock.TransactionStatusMeta.err:type_name -> solana.storage.ConfirmedBlock.TransactionError - 9, // 11: solana.storage.ConfirmedBlock.TransactionStatusMeta.inner_instructions:type_name -> solana.storage.ConfirmedBlock.InnerInstructions - 12, // 12: solana.storage.ConfirmedBlock.TransactionStatusMeta.pre_token_balances:type_name -> solana.storage.ConfirmedBlock.TokenBalance - 12, // 13: solana.storage.ConfirmedBlock.TransactionStatusMeta.post_token_balances:type_name -> solana.storage.ConfirmedBlock.TokenBalance - 15, // 14: solana.storage.ConfirmedBlock.TransactionStatusMeta.rewards:type_name -> solana.storage.ConfirmedBlock.Reward - 14, // 15: solana.storage.ConfirmedBlock.TransactionStatusMeta.return_data:type_name -> solana.storage.ConfirmedBlock.ReturnData - 10, // 16: solana.storage.ConfirmedBlock.InnerInstructions.instructions:type_name -> solana.storage.ConfirmedBlock.InnerInstruction - 13, // 17: solana.storage.ConfirmedBlock.TokenBalance.ui_token_amount:type_name -> solana.storage.ConfirmedBlock.UiTokenAmount - 0, // 18: solana.storage.ConfirmedBlock.Reward.reward_type:type_name -> solana.storage.ConfirmedBlock.RewardType - 15, // 19: solana.storage.ConfirmedBlock.Rewards.rewards:type_name -> solana.storage.ConfirmedBlock.Reward - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 19, // 4: solana.storage.ConfirmedBlock.ConfirmedBlock.num_partitions:type_name -> solana.storage.ConfirmedBlock.NumPartitions + 3, // 5: solana.storage.ConfirmedBlock.ConfirmedTransaction.transaction:type_name -> solana.storage.ConfirmedBlock.Transaction + 7, // 6: solana.storage.ConfirmedBlock.ConfirmedTransaction.meta:type_name -> solana.storage.ConfirmedBlock.TransactionStatusMeta + 4, // 7: solana.storage.ConfirmedBlock.Transaction.message:type_name -> solana.storage.ConfirmedBlock.Message + 5, // 8: solana.storage.ConfirmedBlock.Message.header:type_name -> solana.storage.ConfirmedBlock.MessageHeader + 11, // 9: solana.storage.ConfirmedBlock.Message.instructions:type_name -> solana.storage.ConfirmedBlock.CompiledInstruction + 6, // 10: solana.storage.ConfirmedBlock.Message.address_table_lookups:type_name -> solana.storage.ConfirmedBlock.MessageAddressTableLookup + 8, // 11: solana.storage.ConfirmedBlock.TransactionStatusMeta.err:type_name -> solana.storage.ConfirmedBlock.TransactionError + 9, // 12: solana.storage.ConfirmedBlock.TransactionStatusMeta.inner_instructions:type_name -> solana.storage.ConfirmedBlock.InnerInstructions + 12, // 13: solana.storage.ConfirmedBlock.TransactionStatusMeta.pre_token_balances:type_name -> solana.storage.ConfirmedBlock.TokenBalance + 12, // 14: solana.storage.ConfirmedBlock.TransactionStatusMeta.post_token_balances:type_name -> solana.storage.ConfirmedBlock.TokenBalance + 15, // 15: solana.storage.ConfirmedBlock.TransactionStatusMeta.rewards:type_name -> solana.storage.ConfirmedBlock.Reward + 14, // 16: solana.storage.ConfirmedBlock.TransactionStatusMeta.return_data:type_name -> solana.storage.ConfirmedBlock.ReturnData + 10, // 17: solana.storage.ConfirmedBlock.InnerInstructions.instructions:type_name -> solana.storage.ConfirmedBlock.InnerInstruction + 13, // 18: solana.storage.ConfirmedBlock.TokenBalance.ui_token_amount:type_name -> solana.storage.ConfirmedBlock.UiTokenAmount + 0, // 19: solana.storage.ConfirmedBlock.Reward.reward_type:type_name -> solana.storage.ConfirmedBlock.RewardType + 15, // 20: solana.storage.ConfirmedBlock.Rewards.rewards:type_name -> solana.storage.ConfirmedBlock.Reward + 19, // 21: solana.storage.ConfirmedBlock.Rewards.num_partitions:type_name -> solana.storage.ConfirmedBlock.NumPartitions + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_solana_storage_proto_init() } @@ -1861,6 +1942,18 @@ func file_solana_storage_proto_init() { return nil } } + file_solana_storage_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NumPartitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_solana_storage_proto_msgTypes[6].OneofWrappers = []interface{}{} file_solana_storage_proto_msgTypes[9].OneofWrappers = []interface{}{} @@ -1870,7 +1963,7 @@ func file_solana_storage_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_solana_storage_proto_rawDesc, NumEnums: 1, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, From 747e91feacb43bfb7fdb2f10ed6227f115361997 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Wed, 7 Aug 2024 16:26:53 -0500 Subject: [PATCH 3/3] update ts client --- .../package-lock.json | 100 +- .../src/grpc/geyser.ts | 2287 +++++------------ .../src/grpc/solana-storage.ts | 945 +++---- 3 files changed, 1034 insertions(+), 2298 deletions(-) diff --git a/yellowstone-grpc-client-nodejs/package-lock.json b/yellowstone-grpc-client-nodejs/package-lock.json index 4bf73b70..e536ddfd 100644 --- a/yellowstone-grpc-client-nodejs/package-lock.json +++ b/yellowstone-grpc-client-nodejs/package-lock.json @@ -18,26 +18,27 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.8.17", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.17.tgz", - "integrity": "sha512-DGuSbtMFbaRsyffMf+VEkVu8HkSXEUfO3UyGJNtqxW9ABdtTIA+2UXAJpwbJS+xfQxuwqLUeELmL6FuZkOqPxw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.11.1.tgz", + "integrity": "sha512-gyt/WayZrVPH2w/UTLansS7F9Nwld472JxxaETamrM8HNlsa+jSLNyKAZmhxI2Me4c3mQHFiS1wWHDY1g1Kthw==", + "license": "Apache-2.0", "dependencies": { - "@grpc/proto-loader": "^0.7.0", - "@types/node": ">=12.12.47" + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" }, "engines": { - "node": "^8.13.0 || >=10.10.0" + "node": ">=12.10.0" } }, "node_modules/@grpc/proto-loader": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.7.tgz", - "integrity": "sha512-1TIeXOi8TuSCQprPItwoMymZXxWT0CPxUhkrkeCUH+D8U7QDwQ6b7SUz2MaLuWM2llT+J/TVFLmQI5KtML3BhQ==", + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "license": "Apache-2.0", "dependencies": { - "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", - "long": "^4.0.0", - "protobufjs": "^7.0.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", "yargs": "^17.7.2" }, "bin": { @@ -47,6 +48,22 @@ "node": ">=6" } }, + "node_modules/@grpc/proto-loader/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "license": "Apache-2.0" + }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -104,7 +121,8 @@ "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", + "dev": true }, "node_modules/@types/node": { "version": "20.3.2", @@ -121,6 +139,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", "engines": { "node": ">=8" } @@ -129,6 +148,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -155,6 +175,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -168,6 +189,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -178,7 +200,8 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" }, "node_modules/dataloader": { "version": "1.4.0", @@ -210,12 +233,14 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -224,6 +249,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -232,6 +258,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", "engines": { "node": ">=8" } @@ -239,12 +266,14 @@ "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" }, "node_modules/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "dev": true }, "node_modules/object-hash": { "version": "3.0.0", @@ -271,10 +300,11 @@ } }, "node_modules/protobufjs": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", - "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz", + "integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==", "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -296,12 +326,14 @@ "node_modules/protobufjs/node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "license": "Apache-2.0" }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -310,6 +342,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -323,6 +356,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -368,11 +402,12 @@ } }, "node_modules/ts-proto-descriptors/node_modules/protobufjs": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", - "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "dev": true, "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -394,11 +429,12 @@ } }, "node_modules/ts-proto/node_modules/protobufjs": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", - "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "dev": true, "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -436,6 +472,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -452,6 +489,7 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", "engines": { "node": ">=10" } @@ -460,6 +498,7 @@ "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -477,6 +516,7 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", "engines": { "node": ">=12" } diff --git a/yellowstone-grpc-client-nodejs/src/grpc/geyser.ts b/yellowstone-grpc-client-nodejs/src/grpc/geyser.ts index 0368f441..f06cd3eb 100644 --- a/yellowstone-grpc-client-nodejs/src/grpc/geyser.ts +++ b/yellowstone-grpc-client-nodejs/src/grpc/geyser.ts @@ -152,9 +152,11 @@ export interface SubscribeRequestFilterBlocks { includeEntries?: boolean | undefined; } -export interface SubscribeRequestFilterBlocksMeta {} +export interface SubscribeRequestFilterBlocksMeta { +} -export interface SubscribeRequestFilterEntry {} +export interface SubscribeRequestFilterEntry { +} export interface SubscribeRequestAccountsDataSlice { offset: string; @@ -260,7 +262,8 @@ export interface SubscribeUpdateEntry { startingTransactionIndex: string; } -export interface SubscribeUpdatePing {} +export interface SubscribeUpdatePing { +} export interface SubscribeUpdatePong { id: number; @@ -300,7 +303,8 @@ export interface GetSlotResponse { slot: string; } -export interface GetVersionRequest {} +export interface GetVersionRequest { +} export interface GetVersionResponse { version: string; @@ -332,73 +336,42 @@ function createBaseSubscribeRequest(): SubscribeRequest { } export const SubscribeRequest = { - encode( - message: SubscribeRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { Object.entries(message.accounts).forEach(([key, value]) => { - SubscribeRequest_AccountsEntry.encode( - { key: key as any, value }, - writer.uint32(10).fork() - ).ldelim(); + SubscribeRequest_AccountsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); }); Object.entries(message.slots).forEach(([key, value]) => { - SubscribeRequest_SlotsEntry.encode( - { key: key as any, value }, - writer.uint32(18).fork() - ).ldelim(); + SubscribeRequest_SlotsEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).ldelim(); }); Object.entries(message.transactions).forEach(([key, value]) => { - SubscribeRequest_TransactionsEntry.encode( - { key: key as any, value }, - writer.uint32(26).fork() - ).ldelim(); + SubscribeRequest_TransactionsEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).ldelim(); }); Object.entries(message.transactionsStatus).forEach(([key, value]) => { - SubscribeRequest_TransactionsStatusEntry.encode( - { key: key as any, value }, - writer.uint32(82).fork() - ).ldelim(); + SubscribeRequest_TransactionsStatusEntry.encode({ key: key as any, value }, writer.uint32(82).fork()).ldelim(); }); Object.entries(message.blocks).forEach(([key, value]) => { - SubscribeRequest_BlocksEntry.encode( - { key: key as any, value }, - writer.uint32(34).fork() - ).ldelim(); + SubscribeRequest_BlocksEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim(); }); Object.entries(message.blocksMeta).forEach(([key, value]) => { - SubscribeRequest_BlocksMetaEntry.encode( - { key: key as any, value }, - writer.uint32(42).fork() - ).ldelim(); + SubscribeRequest_BlocksMetaEntry.encode({ key: key as any, value }, writer.uint32(42).fork()).ldelim(); }); Object.entries(message.entry).forEach(([key, value]) => { - SubscribeRequest_EntryEntry.encode( - { key: key as any, value }, - writer.uint32(66).fork() - ).ldelim(); + SubscribeRequest_EntryEntry.encode({ key: key as any, value }, writer.uint32(66).fork()).ldelim(); }); if (message.commitment !== undefined) { writer.uint32(48).int32(message.commitment); } for (const v of message.accountsDataSlice) { - SubscribeRequestAccountsDataSlice.encode( - v!, - writer.uint32(58).fork() - ).ldelim(); + SubscribeRequestAccountsDataSlice.encode(v!, writer.uint32(58).fork()).ldelim(); } if (message.ping !== undefined) { - SubscribeRequestPing.encode( - message.ping, - writer.uint32(74).fork() - ).ldelim(); + SubscribeRequestPing.encode(message.ping, writer.uint32(74).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequest(); while (reader.pos < end) { @@ -409,10 +382,7 @@ export const SubscribeRequest = { break; } - const entry1 = SubscribeRequest_AccountsEntry.decode( - reader, - reader.uint32() - ); + const entry1 = SubscribeRequest_AccountsEntry.decode(reader, reader.uint32()); if (entry1.value !== undefined) { message.accounts[entry1.key] = entry1.value; } @@ -422,10 +392,7 @@ export const SubscribeRequest = { break; } - const entry2 = SubscribeRequest_SlotsEntry.decode( - reader, - reader.uint32() - ); + const entry2 = SubscribeRequest_SlotsEntry.decode(reader, reader.uint32()); if (entry2.value !== undefined) { message.slots[entry2.key] = entry2.value; } @@ -435,10 +402,7 @@ export const SubscribeRequest = { break; } - const entry3 = SubscribeRequest_TransactionsEntry.decode( - reader, - reader.uint32() - ); + const entry3 = SubscribeRequest_TransactionsEntry.decode(reader, reader.uint32()); if (entry3.value !== undefined) { message.transactions[entry3.key] = entry3.value; } @@ -448,10 +412,7 @@ export const SubscribeRequest = { break; } - const entry10 = SubscribeRequest_TransactionsStatusEntry.decode( - reader, - reader.uint32() - ); + const entry10 = SubscribeRequest_TransactionsStatusEntry.decode(reader, reader.uint32()); if (entry10.value !== undefined) { message.transactionsStatus[entry10.key] = entry10.value; } @@ -461,10 +422,7 @@ export const SubscribeRequest = { break; } - const entry4 = SubscribeRequest_BlocksEntry.decode( - reader, - reader.uint32() - ); + const entry4 = SubscribeRequest_BlocksEntry.decode(reader, reader.uint32()); if (entry4.value !== undefined) { message.blocks[entry4.key] = entry4.value; } @@ -474,10 +432,7 @@ export const SubscribeRequest = { break; } - const entry5 = SubscribeRequest_BlocksMetaEntry.decode( - reader, - reader.uint32() - ); + const entry5 = SubscribeRequest_BlocksMetaEntry.decode(reader, reader.uint32()); if (entry5.value !== undefined) { message.blocksMeta[entry5.key] = entry5.value; } @@ -487,10 +442,7 @@ export const SubscribeRequest = { break; } - const entry8 = SubscribeRequest_EntryEntry.decode( - reader, - reader.uint32() - ); + const entry8 = SubscribeRequest_EntryEntry.decode(reader, reader.uint32()); if (entry8.value !== undefined) { message.entry[entry8.key] = entry8.value; } @@ -507,9 +459,7 @@ export const SubscribeRequest = { break; } - message.accountsDataSlice.push( - SubscribeRequestAccountsDataSlice.decode(reader, reader.uint32()) - ); + message.accountsDataSlice.push(SubscribeRequestAccountsDataSlice.decode(reader, reader.uint32())); continue; case 9: if (tag !== 74) { @@ -530,72 +480,64 @@ export const SubscribeRequest = { fromJSON(object: any): SubscribeRequest { return { accounts: isObject(object.accounts) - ? Object.entries(object.accounts).reduce<{ - [key: string]: SubscribeRequestFilterAccounts; - }>((acc, [key, value]) => { + ? Object.entries(object.accounts).reduce<{ [key: string]: SubscribeRequestFilterAccounts }>( + (acc, [key, value]) => { acc[key] = SubscribeRequestFilterAccounts.fromJSON(value); return acc; - }, {}) + }, + {}, + ) : {}, slots: isObject(object.slots) - ? Object.entries(object.slots).reduce<{ - [key: string]: SubscribeRequestFilterSlots; - }>((acc, [key, value]) => { - acc[key] = SubscribeRequestFilterSlots.fromJSON(value); - return acc; - }, {}) + ? Object.entries(object.slots).reduce<{ [key: string]: SubscribeRequestFilterSlots }>((acc, [key, value]) => { + acc[key] = SubscribeRequestFilterSlots.fromJSON(value); + return acc; + }, {}) : {}, transactions: isObject(object.transactions) - ? Object.entries(object.transactions).reduce<{ - [key: string]: SubscribeRequestFilterTransactions; - }>((acc, [key, value]) => { + ? Object.entries(object.transactions).reduce<{ [key: string]: SubscribeRequestFilterTransactions }>( + (acc, [key, value]) => { acc[key] = SubscribeRequestFilterTransactions.fromJSON(value); return acc; - }, {}) + }, + {}, + ) : {}, transactionsStatus: isObject(object.transactionsStatus) - ? Object.entries(object.transactionsStatus).reduce<{ - [key: string]: SubscribeRequestFilterTransactions; - }>((acc, [key, value]) => { + ? Object.entries(object.transactionsStatus).reduce<{ [key: string]: SubscribeRequestFilterTransactions }>( + (acc, [key, value]) => { acc[key] = SubscribeRequestFilterTransactions.fromJSON(value); return acc; - }, {}) + }, + {}, + ) : {}, blocks: isObject(object.blocks) - ? Object.entries(object.blocks).reduce<{ - [key: string]: SubscribeRequestFilterBlocks; - }>((acc, [key, value]) => { - acc[key] = SubscribeRequestFilterBlocks.fromJSON(value); - return acc; - }, {}) + ? Object.entries(object.blocks).reduce<{ [key: string]: SubscribeRequestFilterBlocks }>((acc, [key, value]) => { + acc[key] = SubscribeRequestFilterBlocks.fromJSON(value); + return acc; + }, {}) : {}, blocksMeta: isObject(object.blocksMeta) - ? Object.entries(object.blocksMeta).reduce<{ - [key: string]: SubscribeRequestFilterBlocksMeta; - }>((acc, [key, value]) => { + ? Object.entries(object.blocksMeta).reduce<{ [key: string]: SubscribeRequestFilterBlocksMeta }>( + (acc, [key, value]) => { acc[key] = SubscribeRequestFilterBlocksMeta.fromJSON(value); return acc; - }, {}) + }, + {}, + ) : {}, entry: isObject(object.entry) - ? Object.entries(object.entry).reduce<{ - [key: string]: SubscribeRequestFilterEntry; - }>((acc, [key, value]) => { - acc[key] = SubscribeRequestFilterEntry.fromJSON(value); - return acc; - }, {}) + ? Object.entries(object.entry).reduce<{ [key: string]: SubscribeRequestFilterEntry }>((acc, [key, value]) => { + acc[key] = SubscribeRequestFilterEntry.fromJSON(value); + return acc; + }, {}) : {}, - commitment: isSet(object.commitment) - ? commitmentLevelFromJSON(object.commitment) - : undefined, + commitment: isSet(object.commitment) ? commitmentLevelFromJSON(object.commitment) : undefined, accountsDataSlice: Array.isArray(object?.accountsDataSlice) - ? object.accountsDataSlice.map((e: any) => - SubscribeRequestAccountsDataSlice.fromJSON(e) - ) + ? object.accountsDataSlice.map((e: any) => SubscribeRequestAccountsDataSlice.fromJSON(e)) : [], - ping: isSet(object.ping) - ? SubscribeRequestPing.fromJSON(object.ping) - : undefined, + ping: isSet(object.ping) ? SubscribeRequestPing.fromJSON(object.ping) : undefined, }; }, @@ -622,8 +564,7 @@ export const SubscribeRequest = { obj.transactionsStatus = {}; if (message.transactionsStatus) { Object.entries(message.transactionsStatus).forEach(([k, v]) => { - obj.transactionsStatus[k] = - SubscribeRequestFilterTransactions.toJSON(v); + obj.transactionsStatus[k] = SubscribeRequestFilterTransactions.toJSON(v); }); } obj.blocks = {}; @@ -645,10 +586,7 @@ export const SubscribeRequest = { }); } message.commitment !== undefined && - (obj.commitment = - message.commitment !== undefined - ? commitmentLevelToJSON(message.commitment) - : undefined); + (obj.commitment = message.commitment !== undefined ? commitmentLevelToJSON(message.commitment) : undefined); if (message.accountsDataSlice) { obj.accountsDataSlice = message.accountsDataSlice.map((e) => e ? SubscribeRequestAccountsDataSlice.toJSON(e) : undefined @@ -656,91 +594,82 @@ export const SubscribeRequest = { } else { obj.accountsDataSlice = []; } - message.ping !== undefined && - (obj.ping = message.ping - ? SubscribeRequestPing.toJSON(message.ping) - : undefined); + message.ping !== undefined && (obj.ping = message.ping ? SubscribeRequestPing.toJSON(message.ping) : undefined); return obj; }, - create, I>>( - base?: I - ): SubscribeRequest { + create, I>>(base?: I): SubscribeRequest { return SubscribeRequest.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeRequest { + fromPartial, I>>(object: I): SubscribeRequest { const message = createBaseSubscribeRequest(); - message.accounts = Object.entries(object.accounts ?? {}).reduce<{ - [key: string]: SubscribeRequestFilterAccounts; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = SubscribeRequestFilterAccounts.fromPartial(value); - } - return acc; - }, {}); - message.slots = Object.entries(object.slots ?? {}).reduce<{ - [key: string]: SubscribeRequestFilterSlots; - }>((acc, [key, value]) => { + message.accounts = Object.entries(object.accounts ?? {}).reduce<{ [key: string]: SubscribeRequestFilterAccounts }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = SubscribeRequestFilterAccounts.fromPartial(value); + } + return acc; + }, + {}, + ); + message.slots = Object.entries(object.slots ?? {}).reduce<{ [key: string]: SubscribeRequestFilterSlots }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = SubscribeRequestFilterSlots.fromPartial(value); + } + return acc; + }, + {}, + ); + message.transactions = Object.entries(object.transactions ?? {}).reduce< + { [key: string]: SubscribeRequestFilterTransactions } + >((acc, [key, value]) => { if (value !== undefined) { - acc[key] = SubscribeRequestFilterSlots.fromPartial(value); + acc[key] = SubscribeRequestFilterTransactions.fromPartial(value); } return acc; }, {}); - message.transactions = Object.entries(object.transactions ?? {}).reduce<{ - [key: string]: SubscribeRequestFilterTransactions; - }>((acc, [key, value]) => { + message.transactionsStatus = Object.entries(object.transactionsStatus ?? {}).reduce< + { [key: string]: SubscribeRequestFilterTransactions } + >((acc, [key, value]) => { if (value !== undefined) { acc[key] = SubscribeRequestFilterTransactions.fromPartial(value); } return acc; }, {}); - message.transactionsStatus = Object.entries( - object.transactionsStatus ?? {} - ).reduce<{ [key: string]: SubscribeRequestFilterTransactions }>( + message.blocks = Object.entries(object.blocks ?? {}).reduce<{ [key: string]: SubscribeRequestFilterBlocks }>( (acc, [key, value]) => { if (value !== undefined) { - acc[key] = SubscribeRequestFilterTransactions.fromPartial(value); + acc[key] = SubscribeRequestFilterBlocks.fromPartial(value); } return acc; }, - {} + {}, ); - message.blocks = Object.entries(object.blocks ?? {}).reduce<{ - [key: string]: SubscribeRequestFilterBlocks; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = SubscribeRequestFilterBlocks.fromPartial(value); - } - return acc; - }, {}); - message.blocksMeta = Object.entries(object.blocksMeta ?? {}).reduce<{ - [key: string]: SubscribeRequestFilterBlocksMeta; - }>((acc, [key, value]) => { + message.blocksMeta = Object.entries(object.blocksMeta ?? {}).reduce< + { [key: string]: SubscribeRequestFilterBlocksMeta } + >((acc, [key, value]) => { if (value !== undefined) { acc[key] = SubscribeRequestFilterBlocksMeta.fromPartial(value); } return acc; }, {}); - message.entry = Object.entries(object.entry ?? {}).reduce<{ - [key: string]: SubscribeRequestFilterEntry; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = SubscribeRequestFilterEntry.fromPartial(value); - } - return acc; - }, {}); + message.entry = Object.entries(object.entry ?? {}).reduce<{ [key: string]: SubscribeRequestFilterEntry }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = SubscribeRequestFilterEntry.fromPartial(value); + } + return acc; + }, + {}, + ); message.commitment = object.commitment ?? undefined; message.accountsDataSlice = - object.accountsDataSlice?.map((e) => - SubscribeRequestAccountsDataSlice.fromPartial(e) - ) || []; - message.ping = - object.ping !== undefined && object.ping !== null - ? SubscribeRequestPing.fromPartial(object.ping) - : undefined; + object.accountsDataSlice?.map((e) => SubscribeRequestAccountsDataSlice.fromPartial(e)) || []; + message.ping = (object.ping !== undefined && object.ping !== null) + ? SubscribeRequestPing.fromPartial(object.ping) + : undefined; return message; }, }; @@ -750,28 +679,18 @@ function createBaseSubscribeRequest_AccountsEntry(): SubscribeRequest_AccountsEn } export const SubscribeRequest_AccountsEntry = { - encode( - message: SubscribeRequest_AccountsEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequest_AccountsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - SubscribeRequestFilterAccounts.encode( - message.value, - writer.uint32(18).fork() - ).ldelim(); + SubscribeRequestFilterAccounts.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequest_AccountsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest_AccountsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequest_AccountsEntry(); while (reader.pos < end) { @@ -789,10 +708,7 @@ export const SubscribeRequest_AccountsEntry = { break; } - message.value = SubscribeRequestFilterAccounts.decode( - reader, - reader.uint32() - ); + message.value = SubscribeRequestFilterAccounts.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -806,9 +722,7 @@ export const SubscribeRequest_AccountsEntry = { fromJSON(object: any): SubscribeRequest_AccountsEntry { return { key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? SubscribeRequestFilterAccounts.fromJSON(object.value) - : undefined, + value: isSet(object.value) ? SubscribeRequestFilterAccounts.fromJSON(object.value) : undefined, }; }, @@ -816,27 +730,22 @@ export const SubscribeRequest_AccountsEntry = { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value - ? SubscribeRequestFilterAccounts.toJSON(message.value) - : undefined); + (obj.value = message.value ? SubscribeRequestFilterAccounts.toJSON(message.value) : undefined); return obj; }, - create, I>>( - base?: I - ): SubscribeRequest_AccountsEntry { + create, I>>(base?: I): SubscribeRequest_AccountsEntry { return SubscribeRequest_AccountsEntry.fromPartial(base ?? {}); }, fromPartial, I>>( - object: I + object: I, ): SubscribeRequest_AccountsEntry { const message = createBaseSubscribeRequest_AccountsEntry(); message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SubscribeRequestFilterAccounts.fromPartial(object.value) - : undefined; + message.value = (object.value !== undefined && object.value !== null) + ? SubscribeRequestFilterAccounts.fromPartial(object.value) + : undefined; return message; }, }; @@ -846,28 +755,18 @@ function createBaseSubscribeRequest_SlotsEntry(): SubscribeRequest_SlotsEntry { } export const SubscribeRequest_SlotsEntry = { - encode( - message: SubscribeRequest_SlotsEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequest_SlotsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - SubscribeRequestFilterSlots.encode( - message.value, - writer.uint32(18).fork() - ).ldelim(); + SubscribeRequestFilterSlots.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequest_SlotsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest_SlotsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequest_SlotsEntry(); while (reader.pos < end) { @@ -885,10 +784,7 @@ export const SubscribeRequest_SlotsEntry = { break; } - message.value = SubscribeRequestFilterSlots.decode( - reader, - reader.uint32() - ); + message.value = SubscribeRequestFilterSlots.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -902,9 +798,7 @@ export const SubscribeRequest_SlotsEntry = { fromJSON(object: any): SubscribeRequest_SlotsEntry { return { key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? SubscribeRequestFilterSlots.fromJSON(object.value) - : undefined, + value: isSet(object.value) ? SubscribeRequestFilterSlots.fromJSON(object.value) : undefined, }; }, @@ -912,27 +806,20 @@ export const SubscribeRequest_SlotsEntry = { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value - ? SubscribeRequestFilterSlots.toJSON(message.value) - : undefined); + (obj.value = message.value ? SubscribeRequestFilterSlots.toJSON(message.value) : undefined); return obj; }, - create, I>>( - base?: I - ): SubscribeRequest_SlotsEntry { + create, I>>(base?: I): SubscribeRequest_SlotsEntry { return SubscribeRequest_SlotsEntry.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeRequest_SlotsEntry { + fromPartial, I>>(object: I): SubscribeRequest_SlotsEntry { const message = createBaseSubscribeRequest_SlotsEntry(); message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SubscribeRequestFilterSlots.fromPartial(object.value) - : undefined; + message.value = (object.value !== undefined && object.value !== null) + ? SubscribeRequestFilterSlots.fromPartial(object.value) + : undefined; return message; }, }; @@ -942,28 +829,18 @@ function createBaseSubscribeRequest_TransactionsEntry(): SubscribeRequest_Transa } export const SubscribeRequest_TransactionsEntry = { - encode( - message: SubscribeRequest_TransactionsEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequest_TransactionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - SubscribeRequestFilterTransactions.encode( - message.value, - writer.uint32(18).fork() - ).ldelim(); + SubscribeRequestFilterTransactions.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequest_TransactionsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest_TransactionsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequest_TransactionsEntry(); while (reader.pos < end) { @@ -981,10 +858,7 @@ export const SubscribeRequest_TransactionsEntry = { break; } - message.value = SubscribeRequestFilterTransactions.decode( - reader, - reader.uint32() - ); + message.value = SubscribeRequestFilterTransactions.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -998,9 +872,7 @@ export const SubscribeRequest_TransactionsEntry = { fromJSON(object: any): SubscribeRequest_TransactionsEntry { return { key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? SubscribeRequestFilterTransactions.fromJSON(object.value) - : undefined, + value: isSet(object.value) ? SubscribeRequestFilterTransactions.fromJSON(object.value) : undefined, }; }, @@ -1008,27 +880,24 @@ export const SubscribeRequest_TransactionsEntry = { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value - ? SubscribeRequestFilterTransactions.toJSON(message.value) - : undefined); + (obj.value = message.value ? SubscribeRequestFilterTransactions.toJSON(message.value) : undefined); return obj; }, create, I>>( - base?: I + base?: I, ): SubscribeRequest_TransactionsEntry { return SubscribeRequest_TransactionsEntry.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(object: I): SubscribeRequest_TransactionsEntry { + fromPartial, I>>( + object: I, + ): SubscribeRequest_TransactionsEntry { const message = createBaseSubscribeRequest_TransactionsEntry(); message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SubscribeRequestFilterTransactions.fromPartial(object.value) - : undefined; + message.value = (object.value !== undefined && object.value !== null) + ? SubscribeRequestFilterTransactions.fromPartial(object.value) + : undefined; return message; }, }; @@ -1038,28 +907,18 @@ function createBaseSubscribeRequest_TransactionsStatusEntry(): SubscribeRequest_ } export const SubscribeRequest_TransactionsStatusEntry = { - encode( - message: SubscribeRequest_TransactionsStatusEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequest_TransactionsStatusEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - SubscribeRequestFilterTransactions.encode( - message.value, - writer.uint32(18).fork() - ).ldelim(); + SubscribeRequestFilterTransactions.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequest_TransactionsStatusEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest_TransactionsStatusEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequest_TransactionsStatusEntry(); while (reader.pos < end) { @@ -1077,10 +936,7 @@ export const SubscribeRequest_TransactionsStatusEntry = { break; } - message.value = SubscribeRequestFilterTransactions.decode( - reader, - reader.uint32() - ); + message.value = SubscribeRequestFilterTransactions.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1094,9 +950,7 @@ export const SubscribeRequest_TransactionsStatusEntry = { fromJSON(object: any): SubscribeRequest_TransactionsStatusEntry { return { key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? SubscribeRequestFilterTransactions.fromJSON(object.value) - : undefined, + value: isSet(object.value) ? SubscribeRequestFilterTransactions.fromJSON(object.value) : undefined, }; }, @@ -1104,27 +958,24 @@ export const SubscribeRequest_TransactionsStatusEntry = { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value - ? SubscribeRequestFilterTransactions.toJSON(message.value) - : undefined); + (obj.value = message.value ? SubscribeRequestFilterTransactions.toJSON(message.value) : undefined); return obj; }, - create< - I extends Exact, I> - >(base?: I): SubscribeRequest_TransactionsStatusEntry { + create, I>>( + base?: I, + ): SubscribeRequest_TransactionsStatusEntry { return SubscribeRequest_TransactionsStatusEntry.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(object: I): SubscribeRequest_TransactionsStatusEntry { + fromPartial, I>>( + object: I, + ): SubscribeRequest_TransactionsStatusEntry { const message = createBaseSubscribeRequest_TransactionsStatusEntry(); message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SubscribeRequestFilterTransactions.fromPartial(object.value) - : undefined; + message.value = (object.value !== undefined && object.value !== null) + ? SubscribeRequestFilterTransactions.fromPartial(object.value) + : undefined; return message; }, }; @@ -1134,28 +985,18 @@ function createBaseSubscribeRequest_BlocksEntry(): SubscribeRequest_BlocksEntry } export const SubscribeRequest_BlocksEntry = { - encode( - message: SubscribeRequest_BlocksEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequest_BlocksEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - SubscribeRequestFilterBlocks.encode( - message.value, - writer.uint32(18).fork() - ).ldelim(); + SubscribeRequestFilterBlocks.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequest_BlocksEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest_BlocksEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequest_BlocksEntry(); while (reader.pos < end) { @@ -1173,10 +1014,7 @@ export const SubscribeRequest_BlocksEntry = { break; } - message.value = SubscribeRequestFilterBlocks.decode( - reader, - reader.uint32() - ); + message.value = SubscribeRequestFilterBlocks.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1190,9 +1028,7 @@ export const SubscribeRequest_BlocksEntry = { fromJSON(object: any): SubscribeRequest_BlocksEntry { return { key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? SubscribeRequestFilterBlocks.fromJSON(object.value) - : undefined, + value: isSet(object.value) ? SubscribeRequestFilterBlocks.fromJSON(object.value) : undefined, }; }, @@ -1200,27 +1036,20 @@ export const SubscribeRequest_BlocksEntry = { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value - ? SubscribeRequestFilterBlocks.toJSON(message.value) - : undefined); + (obj.value = message.value ? SubscribeRequestFilterBlocks.toJSON(message.value) : undefined); return obj; }, - create, I>>( - base?: I - ): SubscribeRequest_BlocksEntry { + create, I>>(base?: I): SubscribeRequest_BlocksEntry { return SubscribeRequest_BlocksEntry.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeRequest_BlocksEntry { + fromPartial, I>>(object: I): SubscribeRequest_BlocksEntry { const message = createBaseSubscribeRequest_BlocksEntry(); message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SubscribeRequestFilterBlocks.fromPartial(object.value) - : undefined; + message.value = (object.value !== undefined && object.value !== null) + ? SubscribeRequestFilterBlocks.fromPartial(object.value) + : undefined; return message; }, }; @@ -1230,28 +1059,18 @@ function createBaseSubscribeRequest_BlocksMetaEntry(): SubscribeRequest_BlocksMe } export const SubscribeRequest_BlocksMetaEntry = { - encode( - message: SubscribeRequest_BlocksMetaEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequest_BlocksMetaEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - SubscribeRequestFilterBlocksMeta.encode( - message.value, - writer.uint32(18).fork() - ).ldelim(); + SubscribeRequestFilterBlocksMeta.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequest_BlocksMetaEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest_BlocksMetaEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequest_BlocksMetaEntry(); while (reader.pos < end) { @@ -1269,10 +1088,7 @@ export const SubscribeRequest_BlocksMetaEntry = { break; } - message.value = SubscribeRequestFilterBlocksMeta.decode( - reader, - reader.uint32() - ); + message.value = SubscribeRequestFilterBlocksMeta.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1286,9 +1102,7 @@ export const SubscribeRequest_BlocksMetaEntry = { fromJSON(object: any): SubscribeRequest_BlocksMetaEntry { return { key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? SubscribeRequestFilterBlocksMeta.fromJSON(object.value) - : undefined, + value: isSet(object.value) ? SubscribeRequestFilterBlocksMeta.fromJSON(object.value) : undefined, }; }, @@ -1296,27 +1110,24 @@ export const SubscribeRequest_BlocksMetaEntry = { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value - ? SubscribeRequestFilterBlocksMeta.toJSON(message.value) - : undefined); + (obj.value = message.value ? SubscribeRequestFilterBlocksMeta.toJSON(message.value) : undefined); return obj; }, create, I>>( - base?: I + base?: I, ): SubscribeRequest_BlocksMetaEntry { return SubscribeRequest_BlocksMetaEntry.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(object: I): SubscribeRequest_BlocksMetaEntry { + fromPartial, I>>( + object: I, + ): SubscribeRequest_BlocksMetaEntry { const message = createBaseSubscribeRequest_BlocksMetaEntry(); message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SubscribeRequestFilterBlocksMeta.fromPartial(object.value) - : undefined; + message.value = (object.value !== undefined && object.value !== null) + ? SubscribeRequestFilterBlocksMeta.fromPartial(object.value) + : undefined; return message; }, }; @@ -1326,28 +1137,18 @@ function createBaseSubscribeRequest_EntryEntry(): SubscribeRequest_EntryEntry { } export const SubscribeRequest_EntryEntry = { - encode( - message: SubscribeRequest_EntryEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequest_EntryEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - SubscribeRequestFilterEntry.encode( - message.value, - writer.uint32(18).fork() - ).ldelim(); + SubscribeRequestFilterEntry.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequest_EntryEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest_EntryEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequest_EntryEntry(); while (reader.pos < end) { @@ -1365,10 +1166,7 @@ export const SubscribeRequest_EntryEntry = { break; } - message.value = SubscribeRequestFilterEntry.decode( - reader, - reader.uint32() - ); + message.value = SubscribeRequestFilterEntry.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1382,9 +1180,7 @@ export const SubscribeRequest_EntryEntry = { fromJSON(object: any): SubscribeRequest_EntryEntry { return { key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? SubscribeRequestFilterEntry.fromJSON(object.value) - : undefined, + value: isSet(object.value) ? SubscribeRequestFilterEntry.fromJSON(object.value) : undefined, }; }, @@ -1392,27 +1188,20 @@ export const SubscribeRequest_EntryEntry = { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value - ? SubscribeRequestFilterEntry.toJSON(message.value) - : undefined); + (obj.value = message.value ? SubscribeRequestFilterEntry.toJSON(message.value) : undefined); return obj; }, - create, I>>( - base?: I - ): SubscribeRequest_EntryEntry { + create, I>>(base?: I): SubscribeRequest_EntryEntry { return SubscribeRequest_EntryEntry.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeRequest_EntryEntry { + fromPartial, I>>(object: I): SubscribeRequest_EntryEntry { const message = createBaseSubscribeRequest_EntryEntry(); message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SubscribeRequestFilterEntry.fromPartial(object.value) - : undefined; + message.value = (object.value !== undefined && object.value !== null) + ? SubscribeRequestFilterEntry.fromPartial(object.value) + : undefined; return message; }, }; @@ -1422,10 +1211,7 @@ function createBaseSubscribeRequestFilterAccounts(): SubscribeRequestFilterAccou } export const SubscribeRequestFilterAccounts = { - encode( - message: SubscribeRequestFilterAccounts, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequestFilterAccounts, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.account) { writer.uint32(18).string(v!); } @@ -1433,20 +1219,13 @@ export const SubscribeRequestFilterAccounts = { writer.uint32(26).string(v!); } for (const v of message.filters) { - SubscribeRequestFilterAccountsFilter.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); + SubscribeRequestFilterAccountsFilter.encode(v!, writer.uint32(34).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestFilterAccounts { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestFilterAccounts { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestFilterAccounts(); while (reader.pos < end) { @@ -1471,9 +1250,7 @@ export const SubscribeRequestFilterAccounts = { break; } - message.filters.push( - SubscribeRequestFilterAccountsFilter.decode(reader, reader.uint32()) - ); + message.filters.push(SubscribeRequestFilterAccountsFilter.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1486,16 +1263,10 @@ export const SubscribeRequestFilterAccounts = { fromJSON(object: any): SubscribeRequestFilterAccounts { return { - account: Array.isArray(object?.account) - ? object.account.map((e: any) => String(e)) - : [], - owner: Array.isArray(object?.owner) - ? object.owner.map((e: any) => String(e)) - : [], + account: Array.isArray(object?.account) ? object.account.map((e: any) => String(e)) : [], + owner: Array.isArray(object?.owner) ? object.owner.map((e: any) => String(e)) : [], filters: Array.isArray(object?.filters) - ? object.filters.map((e: any) => - SubscribeRequestFilterAccountsFilter.fromJSON(e) - ) + ? object.filters.map((e: any) => SubscribeRequestFilterAccountsFilter.fromJSON(e)) : [], }; }, @@ -1513,53 +1284,36 @@ export const SubscribeRequestFilterAccounts = { obj.owner = []; } if (message.filters) { - obj.filters = message.filters.map((e) => - e ? SubscribeRequestFilterAccountsFilter.toJSON(e) : undefined - ); + obj.filters = message.filters.map((e) => e ? SubscribeRequestFilterAccountsFilter.toJSON(e) : undefined); } else { obj.filters = []; } return obj; }, - create, I>>( - base?: I - ): SubscribeRequestFilterAccounts { + create, I>>(base?: I): SubscribeRequestFilterAccounts { return SubscribeRequestFilterAccounts.fromPartial(base ?? {}); }, fromPartial, I>>( - object: I + object: I, ): SubscribeRequestFilterAccounts { const message = createBaseSubscribeRequestFilterAccounts(); message.account = object.account?.map((e) => e) || []; message.owner = object.owner?.map((e) => e) || []; - message.filters = - object.filters?.map((e) => - SubscribeRequestFilterAccountsFilter.fromPartial(e) - ) || []; + message.filters = object.filters?.map((e) => SubscribeRequestFilterAccountsFilter.fromPartial(e)) || []; return message; }, }; function createBaseSubscribeRequestFilterAccountsFilter(): SubscribeRequestFilterAccountsFilter { - return { - memcmp: undefined, - datasize: undefined, - tokenAccountState: undefined, - }; + return { memcmp: undefined, datasize: undefined, tokenAccountState: undefined }; } export const SubscribeRequestFilterAccountsFilter = { - encode( - message: SubscribeRequestFilterAccountsFilter, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequestFilterAccountsFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.memcmp !== undefined) { - SubscribeRequestFilterAccountsFilterMemcmp.encode( - message.memcmp, - writer.uint32(10).fork() - ).ldelim(); + SubscribeRequestFilterAccountsFilterMemcmp.encode(message.memcmp, writer.uint32(10).fork()).ldelim(); } if (message.datasize !== undefined) { writer.uint32(16).uint64(message.datasize); @@ -1570,12 +1324,8 @@ export const SubscribeRequestFilterAccountsFilter = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestFilterAccountsFilter { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestFilterAccountsFilter { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestFilterAccountsFilter(); while (reader.pos < end) { @@ -1586,10 +1336,7 @@ export const SubscribeRequestFilterAccountsFilter = { break; } - message.memcmp = SubscribeRequestFilterAccountsFilterMemcmp.decode( - reader, - reader.uint32() - ); + message.memcmp = SubscribeRequestFilterAccountsFilterMemcmp.decode(reader, reader.uint32()); continue; case 2: if (tag !== 16) { @@ -1616,42 +1363,34 @@ export const SubscribeRequestFilterAccountsFilter = { fromJSON(object: any): SubscribeRequestFilterAccountsFilter { return { - memcmp: isSet(object.memcmp) - ? SubscribeRequestFilterAccountsFilterMemcmp.fromJSON(object.memcmp) - : undefined, + memcmp: isSet(object.memcmp) ? SubscribeRequestFilterAccountsFilterMemcmp.fromJSON(object.memcmp) : undefined, datasize: isSet(object.datasize) ? String(object.datasize) : undefined, - tokenAccountState: isSet(object.tokenAccountState) - ? Boolean(object.tokenAccountState) - : undefined, + tokenAccountState: isSet(object.tokenAccountState) ? Boolean(object.tokenAccountState) : undefined, }; }, toJSON(message: SubscribeRequestFilterAccountsFilter): unknown { const obj: any = {}; message.memcmp !== undefined && - (obj.memcmp = message.memcmp - ? SubscribeRequestFilterAccountsFilterMemcmp.toJSON(message.memcmp) - : undefined); + (obj.memcmp = message.memcmp ? SubscribeRequestFilterAccountsFilterMemcmp.toJSON(message.memcmp) : undefined); message.datasize !== undefined && (obj.datasize = message.datasize); - message.tokenAccountState !== undefined && - (obj.tokenAccountState = message.tokenAccountState); + message.tokenAccountState !== undefined && (obj.tokenAccountState = message.tokenAccountState); return obj; }, create, I>>( - base?: I + base?: I, ): SubscribeRequestFilterAccountsFilter { return SubscribeRequestFilterAccountsFilter.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(object: I): SubscribeRequestFilterAccountsFilter { + fromPartial, I>>( + object: I, + ): SubscribeRequestFilterAccountsFilter { const message = createBaseSubscribeRequestFilterAccountsFilter(); - message.memcmp = - object.memcmp !== undefined && object.memcmp !== null - ? SubscribeRequestFilterAccountsFilterMemcmp.fromPartial(object.memcmp) - : undefined; + message.memcmp = (object.memcmp !== undefined && object.memcmp !== null) + ? SubscribeRequestFilterAccountsFilterMemcmp.fromPartial(object.memcmp) + : undefined; message.datasize = object.datasize ?? undefined; message.tokenAccountState = object.tokenAccountState ?? undefined; return message; @@ -1659,19 +1398,11 @@ export const SubscribeRequestFilterAccountsFilter = { }; function createBaseSubscribeRequestFilterAccountsFilterMemcmp(): SubscribeRequestFilterAccountsFilterMemcmp { - return { - offset: "0", - bytes: undefined, - base58: undefined, - base64: undefined, - }; + return { offset: "0", bytes: undefined, base58: undefined, base64: undefined }; } export const SubscribeRequestFilterAccountsFilterMemcmp = { - encode( - message: SubscribeRequestFilterAccountsFilterMemcmp, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequestFilterAccountsFilterMemcmp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.offset !== "0") { writer.uint32(8).uint64(message.offset); } @@ -1687,12 +1418,8 @@ export const SubscribeRequestFilterAccountsFilterMemcmp = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestFilterAccountsFilterMemcmp { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestFilterAccountsFilterMemcmp { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestFilterAccountsFilterMemcmp(); while (reader.pos < end) { @@ -1748,24 +1475,21 @@ export const SubscribeRequestFilterAccountsFilterMemcmp = { const obj: any = {}; message.offset !== undefined && (obj.offset = message.offset); message.bytes !== undefined && - (obj.bytes = - message.bytes !== undefined - ? base64FromBytes(message.bytes) - : undefined); + (obj.bytes = message.bytes !== undefined ? base64FromBytes(message.bytes) : undefined); message.base58 !== undefined && (obj.base58 = message.base58); message.base64 !== undefined && (obj.base64 = message.base64); return obj; }, - create< - I extends Exact, I> - >(base?: I): SubscribeRequestFilterAccountsFilterMemcmp { + create, I>>( + base?: I, + ): SubscribeRequestFilterAccountsFilterMemcmp { return SubscribeRequestFilterAccountsFilterMemcmp.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(object: I): SubscribeRequestFilterAccountsFilterMemcmp { + fromPartial, I>>( + object: I, + ): SubscribeRequestFilterAccountsFilterMemcmp { const message = createBaseSubscribeRequestFilterAccountsFilterMemcmp(); message.offset = object.offset ?? "0"; message.bytes = object.bytes ?? undefined; @@ -1780,22 +1504,15 @@ function createBaseSubscribeRequestFilterSlots(): SubscribeRequestFilterSlots { } export const SubscribeRequestFilterSlots = { - encode( - message: SubscribeRequestFilterSlots, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequestFilterSlots, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filterByCommitment !== undefined) { writer.uint32(8).bool(message.filterByCommitment); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestFilterSlots { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestFilterSlots { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestFilterSlots(); while (reader.pos < end) { @@ -1818,29 +1535,20 @@ export const SubscribeRequestFilterSlots = { }, fromJSON(object: any): SubscribeRequestFilterSlots { - return { - filterByCommitment: isSet(object.filterByCommitment) - ? Boolean(object.filterByCommitment) - : undefined, - }; + return { filterByCommitment: isSet(object.filterByCommitment) ? Boolean(object.filterByCommitment) : undefined }; }, toJSON(message: SubscribeRequestFilterSlots): unknown { const obj: any = {}; - message.filterByCommitment !== undefined && - (obj.filterByCommitment = message.filterByCommitment); + message.filterByCommitment !== undefined && (obj.filterByCommitment = message.filterByCommitment); return obj; }, - create, I>>( - base?: I - ): SubscribeRequestFilterSlots { + create, I>>(base?: I): SubscribeRequestFilterSlots { return SubscribeRequestFilterSlots.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeRequestFilterSlots { + fromPartial, I>>(object: I): SubscribeRequestFilterSlots { const message = createBaseSubscribeRequestFilterSlots(); message.filterByCommitment = object.filterByCommitment ?? undefined; return message; @@ -1859,10 +1567,7 @@ function createBaseSubscribeRequestFilterTransactions(): SubscribeRequestFilterT } export const SubscribeRequestFilterTransactions = { - encode( - message: SubscribeRequestFilterTransactions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequestFilterTransactions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.vote !== undefined) { writer.uint32(8).bool(message.vote); } @@ -1884,12 +1589,8 @@ export const SubscribeRequestFilterTransactions = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestFilterTransactions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestFilterTransactions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestFilterTransactions(); while (reader.pos < end) { @@ -1951,15 +1652,9 @@ export const SubscribeRequestFilterTransactions = { vote: isSet(object.vote) ? Boolean(object.vote) : undefined, failed: isSet(object.failed) ? Boolean(object.failed) : undefined, signature: isSet(object.signature) ? String(object.signature) : undefined, - accountInclude: Array.isArray(object?.accountInclude) - ? object.accountInclude.map((e: any) => String(e)) - : [], - accountExclude: Array.isArray(object?.accountExclude) - ? object.accountExclude.map((e: any) => String(e)) - : [], - accountRequired: Array.isArray(object?.accountRequired) - ? object.accountRequired.map((e: any) => String(e)) - : [], + accountInclude: Array.isArray(object?.accountInclude) ? object.accountInclude.map((e: any) => String(e)) : [], + accountExclude: Array.isArray(object?.accountExclude) ? object.accountExclude.map((e: any) => String(e)) : [], + accountRequired: Array.isArray(object?.accountRequired) ? object.accountRequired.map((e: any) => String(e)) : [], }; }, @@ -1987,14 +1682,14 @@ export const SubscribeRequestFilterTransactions = { }, create, I>>( - base?: I + base?: I, ): SubscribeRequestFilterTransactions { return SubscribeRequestFilterTransactions.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(object: I): SubscribeRequestFilterTransactions { + fromPartial, I>>( + object: I, + ): SubscribeRequestFilterTransactions { const message = createBaseSubscribeRequestFilterTransactions(); message.vote = object.vote ?? undefined; message.failed = object.failed ?? undefined; @@ -2007,19 +1702,11 @@ export const SubscribeRequestFilterTransactions = { }; function createBaseSubscribeRequestFilterBlocks(): SubscribeRequestFilterBlocks { - return { - accountInclude: [], - includeTransactions: undefined, - includeAccounts: undefined, - includeEntries: undefined, - }; + return { accountInclude: [], includeTransactions: undefined, includeAccounts: undefined, includeEntries: undefined }; } export const SubscribeRequestFilterBlocks = { - encode( - message: SubscribeRequestFilterBlocks, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequestFilterBlocks, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accountInclude) { writer.uint32(10).string(v!); } @@ -2035,12 +1722,8 @@ export const SubscribeRequestFilterBlocks = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestFilterBlocks { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestFilterBlocks { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestFilterBlocks(); while (reader.pos < end) { @@ -2085,18 +1768,10 @@ export const SubscribeRequestFilterBlocks = { fromJSON(object: any): SubscribeRequestFilterBlocks { return { - accountInclude: Array.isArray(object?.accountInclude) - ? object.accountInclude.map((e: any) => String(e)) - : [], - includeTransactions: isSet(object.includeTransactions) - ? Boolean(object.includeTransactions) - : undefined, - includeAccounts: isSet(object.includeAccounts) - ? Boolean(object.includeAccounts) - : undefined, - includeEntries: isSet(object.includeEntries) - ? Boolean(object.includeEntries) - : undefined, + accountInclude: Array.isArray(object?.accountInclude) ? object.accountInclude.map((e: any) => String(e)) : [], + includeTransactions: isSet(object.includeTransactions) ? Boolean(object.includeTransactions) : undefined, + includeAccounts: isSet(object.includeAccounts) ? Boolean(object.includeAccounts) : undefined, + includeEntries: isSet(object.includeEntries) ? Boolean(object.includeEntries) : undefined, }; }, @@ -2107,24 +1782,17 @@ export const SubscribeRequestFilterBlocks = { } else { obj.accountInclude = []; } - message.includeTransactions !== undefined && - (obj.includeTransactions = message.includeTransactions); - message.includeAccounts !== undefined && - (obj.includeAccounts = message.includeAccounts); - message.includeEntries !== undefined && - (obj.includeEntries = message.includeEntries); + message.includeTransactions !== undefined && (obj.includeTransactions = message.includeTransactions); + message.includeAccounts !== undefined && (obj.includeAccounts = message.includeAccounts); + message.includeEntries !== undefined && (obj.includeEntries = message.includeEntries); return obj; }, - create, I>>( - base?: I - ): SubscribeRequestFilterBlocks { + create, I>>(base?: I): SubscribeRequestFilterBlocks { return SubscribeRequestFilterBlocks.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeRequestFilterBlocks { + fromPartial, I>>(object: I): SubscribeRequestFilterBlocks { const message = createBaseSubscribeRequestFilterBlocks(); message.accountInclude = object.accountInclude?.map((e) => e) || []; message.includeTransactions = object.includeTransactions ?? undefined; @@ -2139,19 +1807,12 @@ function createBaseSubscribeRequestFilterBlocksMeta(): SubscribeRequestFilterBlo } export const SubscribeRequestFilterBlocksMeta = { - encode( - _: SubscribeRequestFilterBlocksMeta, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: SubscribeRequestFilterBlocksMeta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestFilterBlocksMeta { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestFilterBlocksMeta { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestFilterBlocksMeta(); while (reader.pos < end) { @@ -2176,14 +1837,14 @@ export const SubscribeRequestFilterBlocksMeta = { }, create, I>>( - base?: I + base?: I, ): SubscribeRequestFilterBlocksMeta { return SubscribeRequestFilterBlocksMeta.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(_: I): SubscribeRequestFilterBlocksMeta { + fromPartial, I>>( + _: I, + ): SubscribeRequestFilterBlocksMeta { const message = createBaseSubscribeRequestFilterBlocksMeta(); return message; }, @@ -2194,19 +1855,12 @@ function createBaseSubscribeRequestFilterEntry(): SubscribeRequestFilterEntry { } export const SubscribeRequestFilterEntry = { - encode( - _: SubscribeRequestFilterEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: SubscribeRequestFilterEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestFilterEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestFilterEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestFilterEntry(); while (reader.pos < end) { @@ -2230,15 +1884,11 @@ export const SubscribeRequestFilterEntry = { return obj; }, - create, I>>( - base?: I - ): SubscribeRequestFilterEntry { + create, I>>(base?: I): SubscribeRequestFilterEntry { return SubscribeRequestFilterEntry.fromPartial(base ?? {}); }, - fromPartial, I>>( - _: I - ): SubscribeRequestFilterEntry { + fromPartial, I>>(_: I): SubscribeRequestFilterEntry { const message = createBaseSubscribeRequestFilterEntry(); return message; }, @@ -2249,10 +1899,7 @@ function createBaseSubscribeRequestAccountsDataSlice(): SubscribeRequestAccounts } export const SubscribeRequestAccountsDataSlice = { - encode( - message: SubscribeRequestAccountsDataSlice, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequestAccountsDataSlice, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.offset !== "0") { writer.uint32(8).uint64(message.offset); } @@ -2262,12 +1909,8 @@ export const SubscribeRequestAccountsDataSlice = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestAccountsDataSlice { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestAccountsDataSlice { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestAccountsDataSlice(); while (reader.pos < end) { @@ -2311,14 +1954,14 @@ export const SubscribeRequestAccountsDataSlice = { }, create, I>>( - base?: I + base?: I, ): SubscribeRequestAccountsDataSlice { return SubscribeRequestAccountsDataSlice.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(object: I): SubscribeRequestAccountsDataSlice { + fromPartial, I>>( + object: I, + ): SubscribeRequestAccountsDataSlice { const message = createBaseSubscribeRequestAccountsDataSlice(); message.offset = object.offset ?? "0"; message.length = object.length ?? "0"; @@ -2331,22 +1974,15 @@ function createBaseSubscribeRequestPing(): SubscribeRequestPing { } export const SubscribeRequestPing = { - encode( - message: SubscribeRequestPing, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeRequestPing, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== 0) { writer.uint32(8).int32(message.id); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeRequestPing { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequestPing { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeRequestPing(); while (reader.pos < end) { @@ -2378,15 +2014,11 @@ export const SubscribeRequestPing = { return obj; }, - create, I>>( - base?: I - ): SubscribeRequestPing { + create, I>>(base?: I): SubscribeRequestPing { return SubscribeRequestPing.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeRequestPing { + fromPartial, I>>(object: I): SubscribeRequestPing { const message = createBaseSubscribeRequestPing(); message.id = object.id ?? 0; return message; @@ -2409,73 +2041,42 @@ function createBaseSubscribeUpdate(): SubscribeUpdate { } export const SubscribeUpdate = { - encode( - message: SubscribeUpdate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.filters) { writer.uint32(10).string(v!); } if (message.account !== undefined) { - SubscribeUpdateAccount.encode( - message.account, - writer.uint32(18).fork() - ).ldelim(); + SubscribeUpdateAccount.encode(message.account, writer.uint32(18).fork()).ldelim(); } if (message.slot !== undefined) { - SubscribeUpdateSlot.encode( - message.slot, - writer.uint32(26).fork() - ).ldelim(); + SubscribeUpdateSlot.encode(message.slot, writer.uint32(26).fork()).ldelim(); } if (message.transaction !== undefined) { - SubscribeUpdateTransaction.encode( - message.transaction, - writer.uint32(34).fork() - ).ldelim(); + SubscribeUpdateTransaction.encode(message.transaction, writer.uint32(34).fork()).ldelim(); } if (message.transactionStatus !== undefined) { - SubscribeUpdateTransactionStatus.encode( - message.transactionStatus, - writer.uint32(82).fork() - ).ldelim(); + SubscribeUpdateTransactionStatus.encode(message.transactionStatus, writer.uint32(82).fork()).ldelim(); } if (message.block !== undefined) { - SubscribeUpdateBlock.encode( - message.block, - writer.uint32(42).fork() - ).ldelim(); + SubscribeUpdateBlock.encode(message.block, writer.uint32(42).fork()).ldelim(); } if (message.ping !== undefined) { - SubscribeUpdatePing.encode( - message.ping, - writer.uint32(50).fork() - ).ldelim(); + SubscribeUpdatePing.encode(message.ping, writer.uint32(50).fork()).ldelim(); } if (message.pong !== undefined) { - SubscribeUpdatePong.encode( - message.pong, - writer.uint32(74).fork() - ).ldelim(); + SubscribeUpdatePong.encode(message.pong, writer.uint32(74).fork()).ldelim(); } if (message.blockMeta !== undefined) { - SubscribeUpdateBlockMeta.encode( - message.blockMeta, - writer.uint32(58).fork() - ).ldelim(); + SubscribeUpdateBlockMeta.encode(message.blockMeta, writer.uint32(58).fork()).ldelim(); } if (message.entry !== undefined) { - SubscribeUpdateEntry.encode( - message.entry, - writer.uint32(66).fork() - ).ldelim(); + SubscribeUpdateEntry.encode(message.entry, writer.uint32(66).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdate(); while (reader.pos < end) { @@ -2493,10 +2094,7 @@ export const SubscribeUpdate = { break; } - message.account = SubscribeUpdateAccount.decode( - reader, - reader.uint32() - ); + message.account = SubscribeUpdateAccount.decode(reader, reader.uint32()); continue; case 3: if (tag !== 26) { @@ -2510,20 +2108,14 @@ export const SubscribeUpdate = { break; } - message.transaction = SubscribeUpdateTransaction.decode( - reader, - reader.uint32() - ); + message.transaction = SubscribeUpdateTransaction.decode(reader, reader.uint32()); continue; case 10: if (tag !== 82) { break; } - message.transactionStatus = SubscribeUpdateTransactionStatus.decode( - reader, - reader.uint32() - ); + message.transactionStatus = SubscribeUpdateTransactionStatus.decode(reader, reader.uint32()); continue; case 5: if (tag !== 42) { @@ -2551,10 +2143,7 @@ export const SubscribeUpdate = { break; } - message.blockMeta = SubscribeUpdateBlockMeta.decode( - reader, - reader.uint32() - ); + message.blockMeta = SubscribeUpdateBlockMeta.decode(reader, reader.uint32()); continue; case 8: if (tag !== 66) { @@ -2574,36 +2163,18 @@ export const SubscribeUpdate = { fromJSON(object: any): SubscribeUpdate { return { - filters: Array.isArray(object?.filters) - ? object.filters.map((e: any) => String(e)) - : [], - account: isSet(object.account) - ? SubscribeUpdateAccount.fromJSON(object.account) - : undefined, - slot: isSet(object.slot) - ? SubscribeUpdateSlot.fromJSON(object.slot) - : undefined, - transaction: isSet(object.transaction) - ? SubscribeUpdateTransaction.fromJSON(object.transaction) - : undefined, + filters: Array.isArray(object?.filters) ? object.filters.map((e: any) => String(e)) : [], + account: isSet(object.account) ? SubscribeUpdateAccount.fromJSON(object.account) : undefined, + slot: isSet(object.slot) ? SubscribeUpdateSlot.fromJSON(object.slot) : undefined, + transaction: isSet(object.transaction) ? SubscribeUpdateTransaction.fromJSON(object.transaction) : undefined, transactionStatus: isSet(object.transactionStatus) ? SubscribeUpdateTransactionStatus.fromJSON(object.transactionStatus) : undefined, - block: isSet(object.block) - ? SubscribeUpdateBlock.fromJSON(object.block) - : undefined, - ping: isSet(object.ping) - ? SubscribeUpdatePing.fromJSON(object.ping) - : undefined, - pong: isSet(object.pong) - ? SubscribeUpdatePong.fromJSON(object.pong) - : undefined, - blockMeta: isSet(object.blockMeta) - ? SubscribeUpdateBlockMeta.fromJSON(object.blockMeta) - : undefined, - entry: isSet(object.entry) - ? SubscribeUpdateEntry.fromJSON(object.entry) - : undefined, + block: isSet(object.block) ? SubscribeUpdateBlock.fromJSON(object.block) : undefined, + ping: isSet(object.ping) ? SubscribeUpdatePing.fromJSON(object.ping) : undefined, + pong: isSet(object.pong) ? SubscribeUpdatePong.fromJSON(object.pong) : undefined, + blockMeta: isSet(object.blockMeta) ? SubscribeUpdateBlockMeta.fromJSON(object.blockMeta) : undefined, + entry: isSet(object.entry) ? SubscribeUpdateEntry.fromJSON(object.entry) : undefined, }; }, @@ -2615,92 +2186,56 @@ export const SubscribeUpdate = { obj.filters = []; } message.account !== undefined && - (obj.account = message.account - ? SubscribeUpdateAccount.toJSON(message.account) - : undefined); - message.slot !== undefined && - (obj.slot = message.slot - ? SubscribeUpdateSlot.toJSON(message.slot) - : undefined); + (obj.account = message.account ? SubscribeUpdateAccount.toJSON(message.account) : undefined); + message.slot !== undefined && (obj.slot = message.slot ? SubscribeUpdateSlot.toJSON(message.slot) : undefined); message.transaction !== undefined && - (obj.transaction = message.transaction - ? SubscribeUpdateTransaction.toJSON(message.transaction) - : undefined); - message.transactionStatus !== undefined && - (obj.transactionStatus = message.transactionStatus - ? SubscribeUpdateTransactionStatus.toJSON(message.transactionStatus) - : undefined); - message.block !== undefined && - (obj.block = message.block - ? SubscribeUpdateBlock.toJSON(message.block) - : undefined); - message.ping !== undefined && - (obj.ping = message.ping - ? SubscribeUpdatePing.toJSON(message.ping) - : undefined); - message.pong !== undefined && - (obj.pong = message.pong - ? SubscribeUpdatePong.toJSON(message.pong) - : undefined); + (obj.transaction = message.transaction ? SubscribeUpdateTransaction.toJSON(message.transaction) : undefined); + message.transactionStatus !== undefined && (obj.transactionStatus = message.transactionStatus + ? SubscribeUpdateTransactionStatus.toJSON(message.transactionStatus) + : undefined); + message.block !== undefined && (obj.block = message.block ? SubscribeUpdateBlock.toJSON(message.block) : undefined); + message.ping !== undefined && (obj.ping = message.ping ? SubscribeUpdatePing.toJSON(message.ping) : undefined); + message.pong !== undefined && (obj.pong = message.pong ? SubscribeUpdatePong.toJSON(message.pong) : undefined); message.blockMeta !== undefined && - (obj.blockMeta = message.blockMeta - ? SubscribeUpdateBlockMeta.toJSON(message.blockMeta) - : undefined); - message.entry !== undefined && - (obj.entry = message.entry - ? SubscribeUpdateEntry.toJSON(message.entry) - : undefined); + (obj.blockMeta = message.blockMeta ? SubscribeUpdateBlockMeta.toJSON(message.blockMeta) : undefined); + message.entry !== undefined && (obj.entry = message.entry ? SubscribeUpdateEntry.toJSON(message.entry) : undefined); return obj; }, - create, I>>( - base?: I - ): SubscribeUpdate { + create, I>>(base?: I): SubscribeUpdate { return SubscribeUpdate.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdate { + fromPartial, I>>(object: I): SubscribeUpdate { const message = createBaseSubscribeUpdate(); message.filters = object.filters?.map((e) => e) || []; - message.account = - object.account !== undefined && object.account !== null - ? SubscribeUpdateAccount.fromPartial(object.account) - : undefined; - message.slot = - object.slot !== undefined && object.slot !== null - ? SubscribeUpdateSlot.fromPartial(object.slot) - : undefined; - message.transaction = - object.transaction !== undefined && object.transaction !== null - ? SubscribeUpdateTransaction.fromPartial(object.transaction) - : undefined; - message.transactionStatus = - object.transactionStatus !== undefined && - object.transactionStatus !== null - ? SubscribeUpdateTransactionStatus.fromPartial(object.transactionStatus) - : undefined; - message.block = - object.block !== undefined && object.block !== null - ? SubscribeUpdateBlock.fromPartial(object.block) - : undefined; - message.ping = - object.ping !== undefined && object.ping !== null - ? SubscribeUpdatePing.fromPartial(object.ping) - : undefined; - message.pong = - object.pong !== undefined && object.pong !== null - ? SubscribeUpdatePong.fromPartial(object.pong) - : undefined; - message.blockMeta = - object.blockMeta !== undefined && object.blockMeta !== null - ? SubscribeUpdateBlockMeta.fromPartial(object.blockMeta) - : undefined; - message.entry = - object.entry !== undefined && object.entry !== null - ? SubscribeUpdateEntry.fromPartial(object.entry) - : undefined; + message.account = (object.account !== undefined && object.account !== null) + ? SubscribeUpdateAccount.fromPartial(object.account) + : undefined; + message.slot = (object.slot !== undefined && object.slot !== null) + ? SubscribeUpdateSlot.fromPartial(object.slot) + : undefined; + message.transaction = (object.transaction !== undefined && object.transaction !== null) + ? SubscribeUpdateTransaction.fromPartial(object.transaction) + : undefined; + message.transactionStatus = (object.transactionStatus !== undefined && object.transactionStatus !== null) + ? SubscribeUpdateTransactionStatus.fromPartial(object.transactionStatus) + : undefined; + message.block = (object.block !== undefined && object.block !== null) + ? SubscribeUpdateBlock.fromPartial(object.block) + : undefined; + message.ping = (object.ping !== undefined && object.ping !== null) + ? SubscribeUpdatePing.fromPartial(object.ping) + : undefined; + message.pong = (object.pong !== undefined && object.pong !== null) + ? SubscribeUpdatePong.fromPartial(object.pong) + : undefined; + message.blockMeta = (object.blockMeta !== undefined && object.blockMeta !== null) + ? SubscribeUpdateBlockMeta.fromPartial(object.blockMeta) + : undefined; + message.entry = (object.entry !== undefined && object.entry !== null) + ? SubscribeUpdateEntry.fromPartial(object.entry) + : undefined; return message; }, }; @@ -2710,15 +2245,9 @@ function createBaseSubscribeUpdateAccount(): SubscribeUpdateAccount { } export const SubscribeUpdateAccount = { - encode( - message: SubscribeUpdateAccount, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.account !== undefined) { - SubscribeUpdateAccountInfo.encode( - message.account, - writer.uint32(10).fork() - ).ldelim(); + SubscribeUpdateAccountInfo.encode(message.account, writer.uint32(10).fork()).ldelim(); } if (message.slot !== "0") { writer.uint32(16).uint64(message.slot); @@ -2729,12 +2258,8 @@ export const SubscribeUpdateAccount = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeUpdateAccount { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateAccount { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateAccount(); while (reader.pos < end) { @@ -2745,10 +2270,7 @@ export const SubscribeUpdateAccount = { break; } - message.account = SubscribeUpdateAccountInfo.decode( - reader, - reader.uint32() - ); + message.account = SubscribeUpdateAccountInfo.decode(reader, reader.uint32()); continue; case 2: if (tag !== 16) { @@ -2775,9 +2297,7 @@ export const SubscribeUpdateAccount = { fromJSON(object: any): SubscribeUpdateAccount { return { - account: isSet(object.account) - ? SubscribeUpdateAccountInfo.fromJSON(object.account) - : undefined, + account: isSet(object.account) ? SubscribeUpdateAccountInfo.fromJSON(object.account) : undefined, slot: isSet(object.slot) ? String(object.slot) : "0", isStartup: isSet(object.isStartup) ? Boolean(object.isStartup) : false, }; @@ -2786,28 +2306,21 @@ export const SubscribeUpdateAccount = { toJSON(message: SubscribeUpdateAccount): unknown { const obj: any = {}; message.account !== undefined && - (obj.account = message.account - ? SubscribeUpdateAccountInfo.toJSON(message.account) - : undefined); + (obj.account = message.account ? SubscribeUpdateAccountInfo.toJSON(message.account) : undefined); message.slot !== undefined && (obj.slot = message.slot); message.isStartup !== undefined && (obj.isStartup = message.isStartup); return obj; }, - create, I>>( - base?: I - ): SubscribeUpdateAccount { + create, I>>(base?: I): SubscribeUpdateAccount { return SubscribeUpdateAccount.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdateAccount { + fromPartial, I>>(object: I): SubscribeUpdateAccount { const message = createBaseSubscribeUpdateAccount(); - message.account = - object.account !== undefined && object.account !== null - ? SubscribeUpdateAccountInfo.fromPartial(object.account) - : undefined; + message.account = (object.account !== undefined && object.account !== null) + ? SubscribeUpdateAccountInfo.fromPartial(object.account) + : undefined; message.slot = object.slot ?? "0"; message.isStartup = object.isStartup ?? false; return message; @@ -2828,10 +2341,7 @@ function createBaseSubscribeUpdateAccountInfo(): SubscribeUpdateAccountInfo { } export const SubscribeUpdateAccountInfo = { - encode( - message: SubscribeUpdateAccountInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateAccountInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pubkey.length !== 0) { writer.uint32(10).bytes(message.pubkey); } @@ -2859,12 +2369,8 @@ export const SubscribeUpdateAccountInfo = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeUpdateAccountInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateAccountInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateAccountInfo(); while (reader.pos < end) { @@ -2937,63 +2443,39 @@ export const SubscribeUpdateAccountInfo = { fromJSON(object: any): SubscribeUpdateAccountInfo { return { - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(0), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array(0), lamports: isSet(object.lamports) ? String(object.lamports) : "0", - owner: isSet(object.owner) - ? bytesFromBase64(object.owner) - : new Uint8Array(0), + owner: isSet(object.owner) ? bytesFromBase64(object.owner) : new Uint8Array(0), executable: isSet(object.executable) ? Boolean(object.executable) : false, rentEpoch: isSet(object.rentEpoch) ? String(object.rentEpoch) : "0", - data: isSet(object.data) - ? bytesFromBase64(object.data) - : new Uint8Array(0), - writeVersion: isSet(object.writeVersion) - ? String(object.writeVersion) - : "0", - txnSignature: isSet(object.txnSignature) - ? bytesFromBase64(object.txnSignature) - : undefined, + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), + writeVersion: isSet(object.writeVersion) ? String(object.writeVersion) : "0", + txnSignature: isSet(object.txnSignature) ? bytesFromBase64(object.txnSignature) : undefined, }; }, toJSON(message: SubscribeUpdateAccountInfo): unknown { const obj: any = {}; message.pubkey !== undefined && - (obj.pubkey = base64FromBytes( - message.pubkey !== undefined ? message.pubkey : new Uint8Array(0) - )); + (obj.pubkey = base64FromBytes(message.pubkey !== undefined ? message.pubkey : new Uint8Array(0))); message.lamports !== undefined && (obj.lamports = message.lamports); message.owner !== undefined && - (obj.owner = base64FromBytes( - message.owner !== undefined ? message.owner : new Uint8Array(0) - )); + (obj.owner = base64FromBytes(message.owner !== undefined ? message.owner : new Uint8Array(0))); message.executable !== undefined && (obj.executable = message.executable); message.rentEpoch !== undefined && (obj.rentEpoch = message.rentEpoch); message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array(0) - )); - message.writeVersion !== undefined && - (obj.writeVersion = message.writeVersion); + (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array(0))); + message.writeVersion !== undefined && (obj.writeVersion = message.writeVersion); message.txnSignature !== undefined && - (obj.txnSignature = - message.txnSignature !== undefined - ? base64FromBytes(message.txnSignature) - : undefined); + (obj.txnSignature = message.txnSignature !== undefined ? base64FromBytes(message.txnSignature) : undefined); return obj; }, - create, I>>( - base?: I - ): SubscribeUpdateAccountInfo { + create, I>>(base?: I): SubscribeUpdateAccountInfo { return SubscribeUpdateAccountInfo.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdateAccountInfo { + fromPartial, I>>(object: I): SubscribeUpdateAccountInfo { const message = createBaseSubscribeUpdateAccountInfo(); message.pubkey = object.pubkey ?? new Uint8Array(0); message.lamports = object.lamports ?? "0"; @@ -3012,10 +2494,7 @@ function createBaseSubscribeUpdateSlot(): SubscribeUpdateSlot { } export const SubscribeUpdateSlot = { - encode( - message: SubscribeUpdateSlot, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateSlot, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.slot !== "0") { writer.uint32(8).uint64(message.slot); } @@ -3029,8 +2508,7 @@ export const SubscribeUpdateSlot = { }, decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateSlot { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateSlot(); while (reader.pos < end) { @@ -3078,20 +2556,15 @@ export const SubscribeUpdateSlot = { const obj: any = {}; message.slot !== undefined && (obj.slot = message.slot); message.parent !== undefined && (obj.parent = message.parent); - message.status !== undefined && - (obj.status = commitmentLevelToJSON(message.status)); + message.status !== undefined && (obj.status = commitmentLevelToJSON(message.status)); return obj; }, - create, I>>( - base?: I - ): SubscribeUpdateSlot { + create, I>>(base?: I): SubscribeUpdateSlot { return SubscribeUpdateSlot.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdateSlot { + fromPartial, I>>(object: I): SubscribeUpdateSlot { const message = createBaseSubscribeUpdateSlot(); message.slot = object.slot ?? "0"; message.parent = object.parent ?? undefined; @@ -3105,15 +2578,9 @@ function createBaseSubscribeUpdateTransaction(): SubscribeUpdateTransaction { } export const SubscribeUpdateTransaction = { - encode( - message: SubscribeUpdateTransaction, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateTransaction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.transaction !== undefined) { - SubscribeUpdateTransactionInfo.encode( - message.transaction, - writer.uint32(10).fork() - ).ldelim(); + SubscribeUpdateTransactionInfo.encode(message.transaction, writer.uint32(10).fork()).ldelim(); } if (message.slot !== "0") { writer.uint32(16).uint64(message.slot); @@ -3121,12 +2588,8 @@ export const SubscribeUpdateTransaction = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeUpdateTransaction { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateTransaction { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateTransaction(); while (reader.pos < end) { @@ -3137,10 +2600,7 @@ export const SubscribeUpdateTransaction = { break; } - message.transaction = SubscribeUpdateTransactionInfo.decode( - reader, - reader.uint32() - ); + message.transaction = SubscribeUpdateTransactionInfo.decode(reader, reader.uint32()); continue; case 2: if (tag !== 16) { @@ -3160,9 +2620,7 @@ export const SubscribeUpdateTransaction = { fromJSON(object: any): SubscribeUpdateTransaction { return { - transaction: isSet(object.transaction) - ? SubscribeUpdateTransactionInfo.fromJSON(object.transaction) - : undefined, + transaction: isSet(object.transaction) ? SubscribeUpdateTransactionInfo.fromJSON(object.transaction) : undefined, slot: isSet(object.slot) ? String(object.slot) : "0", }; }, @@ -3170,47 +2628,31 @@ export const SubscribeUpdateTransaction = { toJSON(message: SubscribeUpdateTransaction): unknown { const obj: any = {}; message.transaction !== undefined && - (obj.transaction = message.transaction - ? SubscribeUpdateTransactionInfo.toJSON(message.transaction) - : undefined); + (obj.transaction = message.transaction ? SubscribeUpdateTransactionInfo.toJSON(message.transaction) : undefined); message.slot !== undefined && (obj.slot = message.slot); return obj; }, - create, I>>( - base?: I - ): SubscribeUpdateTransaction { + create, I>>(base?: I): SubscribeUpdateTransaction { return SubscribeUpdateTransaction.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdateTransaction { + fromPartial, I>>(object: I): SubscribeUpdateTransaction { const message = createBaseSubscribeUpdateTransaction(); - message.transaction = - object.transaction !== undefined && object.transaction !== null - ? SubscribeUpdateTransactionInfo.fromPartial(object.transaction) - : undefined; + message.transaction = (object.transaction !== undefined && object.transaction !== null) + ? SubscribeUpdateTransactionInfo.fromPartial(object.transaction) + : undefined; message.slot = object.slot ?? "0"; return message; }, }; function createBaseSubscribeUpdateTransactionInfo(): SubscribeUpdateTransactionInfo { - return { - signature: new Uint8Array(0), - isVote: false, - transaction: undefined, - meta: undefined, - index: "0", - }; + return { signature: new Uint8Array(0), isVote: false, transaction: undefined, meta: undefined, index: "0" }; } export const SubscribeUpdateTransactionInfo = { - encode( - message: SubscribeUpdateTransactionInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateTransactionInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.signature.length !== 0) { writer.uint32(10).bytes(message.signature); } @@ -3218,16 +2660,10 @@ export const SubscribeUpdateTransactionInfo = { writer.uint32(16).bool(message.isVote); } if (message.transaction !== undefined) { - Transaction.encode( - message.transaction, - writer.uint32(26).fork() - ).ldelim(); + Transaction.encode(message.transaction, writer.uint32(26).fork()).ldelim(); } if (message.meta !== undefined) { - TransactionStatusMeta.encode( - message.meta, - writer.uint32(34).fork() - ).ldelim(); + TransactionStatusMeta.encode(message.meta, writer.uint32(34).fork()).ldelim(); } if (message.index !== "0") { writer.uint32(40).uint64(message.index); @@ -3235,12 +2671,8 @@ export const SubscribeUpdateTransactionInfo = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeUpdateTransactionInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateTransactionInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateTransactionInfo(); while (reader.pos < end) { @@ -3292,16 +2724,10 @@ export const SubscribeUpdateTransactionInfo = { fromJSON(object: any): SubscribeUpdateTransactionInfo { return { - signature: isSet(object.signature) - ? bytesFromBase64(object.signature) - : new Uint8Array(0), + signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0), isVote: isSet(object.isVote) ? Boolean(object.isVote) : false, - transaction: isSet(object.transaction) - ? Transaction.fromJSON(object.transaction) - : undefined, - meta: isSet(object.meta) - ? TransactionStatusMeta.fromJSON(object.meta) - : undefined, + transaction: isSet(object.transaction) ? Transaction.fromJSON(object.transaction) : undefined, + meta: isSet(object.meta) ? TransactionStatusMeta.fromJSON(object.meta) : undefined, index: isSet(object.index) ? String(object.index) : "0", }; }, @@ -3309,62 +2735,42 @@ export const SubscribeUpdateTransactionInfo = { toJSON(message: SubscribeUpdateTransactionInfo): unknown { const obj: any = {}; message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array(0) - )); + (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array(0))); message.isVote !== undefined && (obj.isVote = message.isVote); message.transaction !== undefined && - (obj.transaction = message.transaction - ? Transaction.toJSON(message.transaction) - : undefined); - message.meta !== undefined && - (obj.meta = message.meta - ? TransactionStatusMeta.toJSON(message.meta) - : undefined); + (obj.transaction = message.transaction ? Transaction.toJSON(message.transaction) : undefined); + message.meta !== undefined && (obj.meta = message.meta ? TransactionStatusMeta.toJSON(message.meta) : undefined); message.index !== undefined && (obj.index = message.index); return obj; }, - create, I>>( - base?: I - ): SubscribeUpdateTransactionInfo { + create, I>>(base?: I): SubscribeUpdateTransactionInfo { return SubscribeUpdateTransactionInfo.fromPartial(base ?? {}); }, fromPartial, I>>( - object: I + object: I, ): SubscribeUpdateTransactionInfo { const message = createBaseSubscribeUpdateTransactionInfo(); message.signature = object.signature ?? new Uint8Array(0); message.isVote = object.isVote ?? false; - message.transaction = - object.transaction !== undefined && object.transaction !== null - ? Transaction.fromPartial(object.transaction) - : undefined; - message.meta = - object.meta !== undefined && object.meta !== null - ? TransactionStatusMeta.fromPartial(object.meta) - : undefined; + message.transaction = (object.transaction !== undefined && object.transaction !== null) + ? Transaction.fromPartial(object.transaction) + : undefined; + message.meta = (object.meta !== undefined && object.meta !== null) + ? TransactionStatusMeta.fromPartial(object.meta) + : undefined; message.index = object.index ?? "0"; return message; }, }; function createBaseSubscribeUpdateTransactionStatus(): SubscribeUpdateTransactionStatus { - return { - slot: "0", - signature: new Uint8Array(0), - isVote: false, - index: "0", - err: undefined, - }; + return { slot: "0", signature: new Uint8Array(0), isVote: false, index: "0", err: undefined }; } export const SubscribeUpdateTransactionStatus = { - encode( - message: SubscribeUpdateTransactionStatus, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateTransactionStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.slot !== "0") { writer.uint32(8).uint64(message.slot); } @@ -3383,12 +2789,8 @@ export const SubscribeUpdateTransactionStatus = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeUpdateTransactionStatus { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateTransactionStatus { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateTransactionStatus(); while (reader.pos < end) { @@ -3441,14 +2843,10 @@ export const SubscribeUpdateTransactionStatus = { fromJSON(object: any): SubscribeUpdateTransactionStatus { return { slot: isSet(object.slot) ? String(object.slot) : "0", - signature: isSet(object.signature) - ? bytesFromBase64(object.signature) - : new Uint8Array(0), + signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0), isVote: isSet(object.isVote) ? Boolean(object.isVote) : false, index: isSet(object.index) ? String(object.index) : "0", - err: isSet(object.err) - ? TransactionError.fromJSON(object.err) - : undefined, + err: isSet(object.err) ? TransactionError.fromJSON(object.err) : undefined, }; }, @@ -3456,36 +2854,30 @@ export const SubscribeUpdateTransactionStatus = { const obj: any = {}; message.slot !== undefined && (obj.slot = message.slot); message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array(0) - )); + (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array(0))); message.isVote !== undefined && (obj.isVote = message.isVote); message.index !== undefined && (obj.index = message.index); - message.err !== undefined && - (obj.err = message.err - ? TransactionError.toJSON(message.err) - : undefined); + message.err !== undefined && (obj.err = message.err ? TransactionError.toJSON(message.err) : undefined); return obj; }, create, I>>( - base?: I + base?: I, ): SubscribeUpdateTransactionStatus { return SubscribeUpdateTransactionStatus.fromPartial(base ?? {}); }, - fromPartial< - I extends Exact, I> - >(object: I): SubscribeUpdateTransactionStatus { + fromPartial, I>>( + object: I, + ): SubscribeUpdateTransactionStatus { const message = createBaseSubscribeUpdateTransactionStatus(); message.slot = object.slot ?? "0"; message.signature = object.signature ?? new Uint8Array(0); message.isVote = object.isVote ?? false; message.index = object.index ?? "0"; - message.err = - object.err !== undefined && object.err !== null - ? TransactionError.fromPartial(object.err) - : undefined; + message.err = (object.err !== undefined && object.err !== null) + ? TransactionError.fromPartial(object.err) + : undefined; return message; }, }; @@ -3509,10 +2901,7 @@ function createBaseSubscribeUpdateBlock(): SubscribeUpdateBlock { } export const SubscribeUpdateBlock = { - encode( - message: SubscribeUpdateBlock, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateBlock, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.slot !== "0") { writer.uint32(8).uint64(message.slot); } @@ -3523,16 +2912,10 @@ export const SubscribeUpdateBlock = { Rewards.encode(message.rewards, writer.uint32(26).fork()).ldelim(); } if (message.blockTime !== undefined) { - UnixTimestamp.encode( - message.blockTime, - writer.uint32(34).fork() - ).ldelim(); + UnixTimestamp.encode(message.blockTime, writer.uint32(34).fork()).ldelim(); } if (message.blockHeight !== undefined) { - BlockHeight.encode( - message.blockHeight, - writer.uint32(42).fork() - ).ldelim(); + BlockHeight.encode(message.blockHeight, writer.uint32(42).fork()).ldelim(); } if (message.parentSlot !== "0") { writer.uint32(56).uint64(message.parentSlot); @@ -3544,10 +2927,7 @@ export const SubscribeUpdateBlock = { writer.uint32(72).uint64(message.executedTransactionCount); } for (const v of message.transactions) { - SubscribeUpdateTransactionInfo.encode( - v!, - writer.uint32(50).fork() - ).ldelim(); + SubscribeUpdateTransactionInfo.encode(v!, writer.uint32(50).fork()).ldelim(); } if (message.updatedAccountCount !== "0") { writer.uint32(80).uint64(message.updatedAccountCount); @@ -3564,12 +2944,8 @@ export const SubscribeUpdateBlock = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeUpdateBlock { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateBlock { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateBlock(); while (reader.pos < end) { @@ -3629,18 +3005,14 @@ export const SubscribeUpdateBlock = { break; } - message.executedTransactionCount = longToString( - reader.uint64() as Long - ); + message.executedTransactionCount = longToString(reader.uint64() as Long); continue; case 6: if (tag !== 50) { break; } - message.transactions.push( - SubscribeUpdateTransactionInfo.decode(reader, reader.uint32()) - ); + message.transactions.push(SubscribeUpdateTransactionInfo.decode(reader, reader.uint32())); continue; case 10: if (tag !== 80) { @@ -3654,9 +3026,7 @@ export const SubscribeUpdateBlock = { break; } - message.accounts.push( - SubscribeUpdateAccountInfo.decode(reader, reader.uint32()) - ); + message.accounts.push(SubscribeUpdateAccountInfo.decode(reader, reader.uint32())); continue; case 12: if (tag !== 96) { @@ -3670,9 +3040,7 @@ export const SubscribeUpdateBlock = { break; } - message.entries.push( - SubscribeUpdateEntry.decode(reader, reader.uint32()) - ); + message.entries.push(SubscribeUpdateEntry.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -3687,41 +3055,21 @@ export const SubscribeUpdateBlock = { return { slot: isSet(object.slot) ? String(object.slot) : "0", blockhash: isSet(object.blockhash) ? String(object.blockhash) : "", - rewards: isSet(object.rewards) - ? Rewards.fromJSON(object.rewards) - : undefined, - blockTime: isSet(object.blockTime) - ? UnixTimestamp.fromJSON(object.blockTime) - : undefined, - blockHeight: isSet(object.blockHeight) - ? BlockHeight.fromJSON(object.blockHeight) - : undefined, + rewards: isSet(object.rewards) ? Rewards.fromJSON(object.rewards) : undefined, + blockTime: isSet(object.blockTime) ? UnixTimestamp.fromJSON(object.blockTime) : undefined, + blockHeight: isSet(object.blockHeight) ? BlockHeight.fromJSON(object.blockHeight) : undefined, parentSlot: isSet(object.parentSlot) ? String(object.parentSlot) : "0", - parentBlockhash: isSet(object.parentBlockhash) - ? String(object.parentBlockhash) - : "", - executedTransactionCount: isSet(object.executedTransactionCount) - ? String(object.executedTransactionCount) - : "0", + parentBlockhash: isSet(object.parentBlockhash) ? String(object.parentBlockhash) : "", + executedTransactionCount: isSet(object.executedTransactionCount) ? String(object.executedTransactionCount) : "0", transactions: Array.isArray(object?.transactions) - ? object.transactions.map((e: any) => - SubscribeUpdateTransactionInfo.fromJSON(e) - ) + ? object.transactions.map((e: any) => SubscribeUpdateTransactionInfo.fromJSON(e)) : [], - updatedAccountCount: isSet(object.updatedAccountCount) - ? String(object.updatedAccountCount) - : "0", + updatedAccountCount: isSet(object.updatedAccountCount) ? String(object.updatedAccountCount) : "0", accounts: Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => - SubscribeUpdateAccountInfo.fromJSON(e) - ) - : [], - entriesCount: isSet(object.entriesCount) - ? String(object.entriesCount) - : "0", - entries: Array.isArray(object?.entries) - ? object.entries.map((e: any) => SubscribeUpdateEntry.fromJSON(e)) + ? object.accounts.map((e: any) => SubscribeUpdateAccountInfo.fromJSON(e)) : [], + entriesCount: isSet(object.entriesCount) ? String(object.entriesCount) : "0", + entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => SubscribeUpdateEntry.fromJSON(e)) : [], }; }, @@ -3729,89 +3077,59 @@ export const SubscribeUpdateBlock = { const obj: any = {}; message.slot !== undefined && (obj.slot = message.slot); message.blockhash !== undefined && (obj.blockhash = message.blockhash); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? Rewards.toJSON(message.rewards) - : undefined); + message.rewards !== undefined && (obj.rewards = message.rewards ? Rewards.toJSON(message.rewards) : undefined); message.blockTime !== undefined && - (obj.blockTime = message.blockTime - ? UnixTimestamp.toJSON(message.blockTime) - : undefined); + (obj.blockTime = message.blockTime ? UnixTimestamp.toJSON(message.blockTime) : undefined); message.blockHeight !== undefined && - (obj.blockHeight = message.blockHeight - ? BlockHeight.toJSON(message.blockHeight) - : undefined); + (obj.blockHeight = message.blockHeight ? BlockHeight.toJSON(message.blockHeight) : undefined); message.parentSlot !== undefined && (obj.parentSlot = message.parentSlot); - message.parentBlockhash !== undefined && - (obj.parentBlockhash = message.parentBlockhash); - message.executedTransactionCount !== undefined && - (obj.executedTransactionCount = message.executedTransactionCount); + message.parentBlockhash !== undefined && (obj.parentBlockhash = message.parentBlockhash); + message.executedTransactionCount !== undefined && (obj.executedTransactionCount = message.executedTransactionCount); if (message.transactions) { - obj.transactions = message.transactions.map((e) => - e ? SubscribeUpdateTransactionInfo.toJSON(e) : undefined - ); + obj.transactions = message.transactions.map((e) => e ? SubscribeUpdateTransactionInfo.toJSON(e) : undefined); } else { obj.transactions = []; } - message.updatedAccountCount !== undefined && - (obj.updatedAccountCount = message.updatedAccountCount); + message.updatedAccountCount !== undefined && (obj.updatedAccountCount = message.updatedAccountCount); if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? SubscribeUpdateAccountInfo.toJSON(e) : undefined - ); + obj.accounts = message.accounts.map((e) => e ? SubscribeUpdateAccountInfo.toJSON(e) : undefined); } else { obj.accounts = []; } - message.entriesCount !== undefined && - (obj.entriesCount = message.entriesCount); + message.entriesCount !== undefined && (obj.entriesCount = message.entriesCount); if (message.entries) { - obj.entries = message.entries.map((e) => - e ? SubscribeUpdateEntry.toJSON(e) : undefined - ); + obj.entries = message.entries.map((e) => e ? SubscribeUpdateEntry.toJSON(e) : undefined); } else { obj.entries = []; } return obj; }, - create, I>>( - base?: I - ): SubscribeUpdateBlock { + create, I>>(base?: I): SubscribeUpdateBlock { return SubscribeUpdateBlock.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdateBlock { + fromPartial, I>>(object: I): SubscribeUpdateBlock { const message = createBaseSubscribeUpdateBlock(); message.slot = object.slot ?? "0"; message.blockhash = object.blockhash ?? ""; - message.rewards = - object.rewards !== undefined && object.rewards !== null - ? Rewards.fromPartial(object.rewards) - : undefined; - message.blockTime = - object.blockTime !== undefined && object.blockTime !== null - ? UnixTimestamp.fromPartial(object.blockTime) - : undefined; - message.blockHeight = - object.blockHeight !== undefined && object.blockHeight !== null - ? BlockHeight.fromPartial(object.blockHeight) - : undefined; + message.rewards = (object.rewards !== undefined && object.rewards !== null) + ? Rewards.fromPartial(object.rewards) + : undefined; + message.blockTime = (object.blockTime !== undefined && object.blockTime !== null) + ? UnixTimestamp.fromPartial(object.blockTime) + : undefined; + message.blockHeight = (object.blockHeight !== undefined && object.blockHeight !== null) + ? BlockHeight.fromPartial(object.blockHeight) + : undefined; message.parentSlot = object.parentSlot ?? "0"; message.parentBlockhash = object.parentBlockhash ?? ""; message.executedTransactionCount = object.executedTransactionCount ?? "0"; - message.transactions = - object.transactions?.map((e) => - SubscribeUpdateTransactionInfo.fromPartial(e) - ) || []; + message.transactions = object.transactions?.map((e) => SubscribeUpdateTransactionInfo.fromPartial(e)) || []; message.updatedAccountCount = object.updatedAccountCount ?? "0"; - message.accounts = - object.accounts?.map((e) => SubscribeUpdateAccountInfo.fromPartial(e)) || - []; + message.accounts = object.accounts?.map((e) => SubscribeUpdateAccountInfo.fromPartial(e)) || []; message.entriesCount = object.entriesCount ?? "0"; - message.entries = - object.entries?.map((e) => SubscribeUpdateEntry.fromPartial(e)) || []; + message.entries = object.entries?.map((e) => SubscribeUpdateEntry.fromPartial(e)) || []; return message; }, }; @@ -3831,10 +3149,7 @@ function createBaseSubscribeUpdateBlockMeta(): SubscribeUpdateBlockMeta { } export const SubscribeUpdateBlockMeta = { - encode( - message: SubscribeUpdateBlockMeta, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateBlockMeta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.slot !== "0") { writer.uint32(8).uint64(message.slot); } @@ -3845,16 +3160,10 @@ export const SubscribeUpdateBlockMeta = { Rewards.encode(message.rewards, writer.uint32(26).fork()).ldelim(); } if (message.blockTime !== undefined) { - UnixTimestamp.encode( - message.blockTime, - writer.uint32(34).fork() - ).ldelim(); + UnixTimestamp.encode(message.blockTime, writer.uint32(34).fork()).ldelim(); } if (message.blockHeight !== undefined) { - BlockHeight.encode( - message.blockHeight, - writer.uint32(42).fork() - ).ldelim(); + BlockHeight.encode(message.blockHeight, writer.uint32(42).fork()).ldelim(); } if (message.parentSlot !== "0") { writer.uint32(48).uint64(message.parentSlot); @@ -3871,12 +3180,8 @@ export const SubscribeUpdateBlockMeta = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeUpdateBlockMeta { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateBlockMeta { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateBlockMeta(); while (reader.pos < end) { @@ -3936,9 +3241,7 @@ export const SubscribeUpdateBlockMeta = { break; } - message.executedTransactionCount = longToString( - reader.uint64() as Long - ); + message.executedTransactionCount = longToString(reader.uint64() as Long); continue; case 9: if (tag !== 72) { @@ -3960,25 +3263,13 @@ export const SubscribeUpdateBlockMeta = { return { slot: isSet(object.slot) ? String(object.slot) : "0", blockhash: isSet(object.blockhash) ? String(object.blockhash) : "", - rewards: isSet(object.rewards) - ? Rewards.fromJSON(object.rewards) - : undefined, - blockTime: isSet(object.blockTime) - ? UnixTimestamp.fromJSON(object.blockTime) - : undefined, - blockHeight: isSet(object.blockHeight) - ? BlockHeight.fromJSON(object.blockHeight) - : undefined, + rewards: isSet(object.rewards) ? Rewards.fromJSON(object.rewards) : undefined, + blockTime: isSet(object.blockTime) ? UnixTimestamp.fromJSON(object.blockTime) : undefined, + blockHeight: isSet(object.blockHeight) ? BlockHeight.fromJSON(object.blockHeight) : undefined, parentSlot: isSet(object.parentSlot) ? String(object.parentSlot) : "0", - parentBlockhash: isSet(object.parentBlockhash) - ? String(object.parentBlockhash) - : "", - executedTransactionCount: isSet(object.executedTransactionCount) - ? String(object.executedTransactionCount) - : "0", - entriesCount: isSet(object.entriesCount) - ? String(object.entriesCount) - : "0", + parentBlockhash: isSet(object.parentBlockhash) ? String(object.parentBlockhash) : "", + executedTransactionCount: isSet(object.executedTransactionCount) ? String(object.executedTransactionCount) : "0", + entriesCount: isSet(object.entriesCount) ? String(object.entriesCount) : "0", }; }, @@ -3986,52 +3277,35 @@ export const SubscribeUpdateBlockMeta = { const obj: any = {}; message.slot !== undefined && (obj.slot = message.slot); message.blockhash !== undefined && (obj.blockhash = message.blockhash); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? Rewards.toJSON(message.rewards) - : undefined); + message.rewards !== undefined && (obj.rewards = message.rewards ? Rewards.toJSON(message.rewards) : undefined); message.blockTime !== undefined && - (obj.blockTime = message.blockTime - ? UnixTimestamp.toJSON(message.blockTime) - : undefined); + (obj.blockTime = message.blockTime ? UnixTimestamp.toJSON(message.blockTime) : undefined); message.blockHeight !== undefined && - (obj.blockHeight = message.blockHeight - ? BlockHeight.toJSON(message.blockHeight) - : undefined); + (obj.blockHeight = message.blockHeight ? BlockHeight.toJSON(message.blockHeight) : undefined); message.parentSlot !== undefined && (obj.parentSlot = message.parentSlot); - message.parentBlockhash !== undefined && - (obj.parentBlockhash = message.parentBlockhash); - message.executedTransactionCount !== undefined && - (obj.executedTransactionCount = message.executedTransactionCount); - message.entriesCount !== undefined && - (obj.entriesCount = message.entriesCount); + message.parentBlockhash !== undefined && (obj.parentBlockhash = message.parentBlockhash); + message.executedTransactionCount !== undefined && (obj.executedTransactionCount = message.executedTransactionCount); + message.entriesCount !== undefined && (obj.entriesCount = message.entriesCount); return obj; }, - create, I>>( - base?: I - ): SubscribeUpdateBlockMeta { + create, I>>(base?: I): SubscribeUpdateBlockMeta { return SubscribeUpdateBlockMeta.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdateBlockMeta { + fromPartial, I>>(object: I): SubscribeUpdateBlockMeta { const message = createBaseSubscribeUpdateBlockMeta(); message.slot = object.slot ?? "0"; message.blockhash = object.blockhash ?? ""; - message.rewards = - object.rewards !== undefined && object.rewards !== null - ? Rewards.fromPartial(object.rewards) - : undefined; - message.blockTime = - object.blockTime !== undefined && object.blockTime !== null - ? UnixTimestamp.fromPartial(object.blockTime) - : undefined; - message.blockHeight = - object.blockHeight !== undefined && object.blockHeight !== null - ? BlockHeight.fromPartial(object.blockHeight) - : undefined; + message.rewards = (object.rewards !== undefined && object.rewards !== null) + ? Rewards.fromPartial(object.rewards) + : undefined; + message.blockTime = (object.blockTime !== undefined && object.blockTime !== null) + ? UnixTimestamp.fromPartial(object.blockTime) + : undefined; + message.blockHeight = (object.blockHeight !== undefined && object.blockHeight !== null) + ? BlockHeight.fromPartial(object.blockHeight) + : undefined; message.parentSlot = object.parentSlot ?? "0"; message.parentBlockhash = object.parentBlockhash ?? ""; message.executedTransactionCount = object.executedTransactionCount ?? "0"; @@ -4052,10 +3326,7 @@ function createBaseSubscribeUpdateEntry(): SubscribeUpdateEntry { } export const SubscribeUpdateEntry = { - encode( - message: SubscribeUpdateEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdateEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.slot !== "0") { writer.uint32(8).uint64(message.slot); } @@ -4077,12 +3348,8 @@ export const SubscribeUpdateEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubscribeUpdateEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdateEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdateEntry(); while (reader.pos < end) { @@ -4121,18 +3388,14 @@ export const SubscribeUpdateEntry = { break; } - message.executedTransactionCount = longToString( - reader.uint64() as Long - ); + message.executedTransactionCount = longToString(reader.uint64() as Long); continue; case 6: if (tag !== 48) { break; } - message.startingTransactionIndex = longToString( - reader.uint64() as Long - ); + message.startingTransactionIndex = longToString(reader.uint64() as Long); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4148,15 +3411,9 @@ export const SubscribeUpdateEntry = { slot: isSet(object.slot) ? String(object.slot) : "0", index: isSet(object.index) ? String(object.index) : "0", numHashes: isSet(object.numHashes) ? String(object.numHashes) : "0", - hash: isSet(object.hash) - ? bytesFromBase64(object.hash) - : new Uint8Array(0), - executedTransactionCount: isSet(object.executedTransactionCount) - ? String(object.executedTransactionCount) - : "0", - startingTransactionIndex: isSet(object.startingTransactionIndex) - ? String(object.startingTransactionIndex) - : "0", + hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(0), + executedTransactionCount: isSet(object.executedTransactionCount) ? String(object.executedTransactionCount) : "0", + startingTransactionIndex: isSet(object.startingTransactionIndex) ? String(object.startingTransactionIndex) : "0", }; }, @@ -4166,25 +3423,17 @@ export const SubscribeUpdateEntry = { message.index !== undefined && (obj.index = message.index); message.numHashes !== undefined && (obj.numHashes = message.numHashes); message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array(0) - )); - message.executedTransactionCount !== undefined && - (obj.executedTransactionCount = message.executedTransactionCount); - message.startingTransactionIndex !== undefined && - (obj.startingTransactionIndex = message.startingTransactionIndex); + (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array(0))); + message.executedTransactionCount !== undefined && (obj.executedTransactionCount = message.executedTransactionCount); + message.startingTransactionIndex !== undefined && (obj.startingTransactionIndex = message.startingTransactionIndex); return obj; }, - create, I>>( - base?: I - ): SubscribeUpdateEntry { + create, I>>(base?: I): SubscribeUpdateEntry { return SubscribeUpdateEntry.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdateEntry { + fromPartial, I>>(object: I): SubscribeUpdateEntry { const message = createBaseSubscribeUpdateEntry(); message.slot = object.slot ?? "0"; message.index = object.index ?? "0"; @@ -4201,16 +3450,12 @@ function createBaseSubscribeUpdatePing(): SubscribeUpdatePing { } export const SubscribeUpdatePing = { - encode( - _: SubscribeUpdatePing, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: SubscribeUpdatePing, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdatePing { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdatePing(); while (reader.pos < end) { @@ -4234,15 +3479,11 @@ export const SubscribeUpdatePing = { return obj; }, - create, I>>( - base?: I - ): SubscribeUpdatePing { + create, I>>(base?: I): SubscribeUpdatePing { return SubscribeUpdatePing.fromPartial(base ?? {}); }, - fromPartial, I>>( - _: I - ): SubscribeUpdatePing { + fromPartial, I>>(_: I): SubscribeUpdatePing { const message = createBaseSubscribeUpdatePing(); return message; }, @@ -4253,10 +3494,7 @@ function createBaseSubscribeUpdatePong(): SubscribeUpdatePong { } export const SubscribeUpdatePong = { - encode( - message: SubscribeUpdatePong, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SubscribeUpdatePong, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== 0) { writer.uint32(8).int32(message.id); } @@ -4264,8 +3502,7 @@ export const SubscribeUpdatePong = { }, decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeUpdatePong { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSubscribeUpdatePong(); while (reader.pos < end) { @@ -4297,15 +3534,11 @@ export const SubscribeUpdatePong = { return obj; }, - create, I>>( - base?: I - ): SubscribeUpdatePong { + create, I>>(base?: I): SubscribeUpdatePong { return SubscribeUpdatePong.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): SubscribeUpdatePong { + fromPartial, I>>(object: I): SubscribeUpdatePong { const message = createBaseSubscribeUpdatePong(); message.id = object.id ?? 0; return message; @@ -4317,10 +3550,7 @@ function createBasePingRequest(): PingRequest { } export const PingRequest = { - encode( - message: PingRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PingRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.count !== 0) { writer.uint32(8).int32(message.count); } @@ -4328,8 +3558,7 @@ export const PingRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): PingRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePingRequest(); while (reader.pos < end) { @@ -4365,9 +3594,7 @@ export const PingRequest = { return PingRequest.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): PingRequest { + fromPartial, I>>(object: I): PingRequest { const message = createBasePingRequest(); message.count = object.count ?? 0; return message; @@ -4379,10 +3606,7 @@ function createBasePongResponse(): PongResponse { } export const PongResponse = { - encode( - message: PongResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PongResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.count !== 0) { writer.uint32(8).int32(message.count); } @@ -4390,8 +3614,7 @@ export const PongResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): PongResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePongResponse(); while (reader.pos < end) { @@ -4423,15 +3646,11 @@ export const PongResponse = { return obj; }, - create, I>>( - base?: I - ): PongResponse { + create, I>>(base?: I): PongResponse { return PongResponse.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): PongResponse { + fromPartial, I>>(object: I): PongResponse { const message = createBasePongResponse(); message.count = object.count ?? 0; return message; @@ -4443,22 +3662,15 @@ function createBaseGetLatestBlockhashRequest(): GetLatestBlockhashRequest { } export const GetLatestBlockhashRequest = { - encode( - message: GetLatestBlockhashRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetLatestBlockhashRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.commitment !== undefined) { writer.uint32(8).int32(message.commitment); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetLatestBlockhashRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): GetLatestBlockhashRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetLatestBlockhashRequest(); while (reader.pos < end) { @@ -4481,32 +3693,21 @@ export const GetLatestBlockhashRequest = { }, fromJSON(object: any): GetLatestBlockhashRequest { - return { - commitment: isSet(object.commitment) - ? commitmentLevelFromJSON(object.commitment) - : undefined, - }; + return { commitment: isSet(object.commitment) ? commitmentLevelFromJSON(object.commitment) : undefined }; }, toJSON(message: GetLatestBlockhashRequest): unknown { const obj: any = {}; message.commitment !== undefined && - (obj.commitment = - message.commitment !== undefined - ? commitmentLevelToJSON(message.commitment) - : undefined); + (obj.commitment = message.commitment !== undefined ? commitmentLevelToJSON(message.commitment) : undefined); return obj; }, - create, I>>( - base?: I - ): GetLatestBlockhashRequest { + create, I>>(base?: I): GetLatestBlockhashRequest { return GetLatestBlockhashRequest.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): GetLatestBlockhashRequest { + fromPartial, I>>(object: I): GetLatestBlockhashRequest { const message = createBaseGetLatestBlockhashRequest(); message.commitment = object.commitment ?? undefined; return message; @@ -4518,10 +3719,7 @@ function createBaseGetLatestBlockhashResponse(): GetLatestBlockhashResponse { } export const GetLatestBlockhashResponse = { - encode( - message: GetLatestBlockhashResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetLatestBlockhashResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.slot !== "0") { writer.uint32(8).uint64(message.slot); } @@ -4534,12 +3732,8 @@ export const GetLatestBlockhashResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetLatestBlockhashResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): GetLatestBlockhashResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetLatestBlockhashResponse(); while (reader.pos < end) { @@ -4579,9 +3773,7 @@ export const GetLatestBlockhashResponse = { return { slot: isSet(object.slot) ? String(object.slot) : "0", blockhash: isSet(object.blockhash) ? String(object.blockhash) : "", - lastValidBlockHeight: isSet(object.lastValidBlockHeight) - ? String(object.lastValidBlockHeight) - : "0", + lastValidBlockHeight: isSet(object.lastValidBlockHeight) ? String(object.lastValidBlockHeight) : "0", }; }, @@ -4589,20 +3781,15 @@ export const GetLatestBlockhashResponse = { const obj: any = {}; message.slot !== undefined && (obj.slot = message.slot); message.blockhash !== undefined && (obj.blockhash = message.blockhash); - message.lastValidBlockHeight !== undefined && - (obj.lastValidBlockHeight = message.lastValidBlockHeight); + message.lastValidBlockHeight !== undefined && (obj.lastValidBlockHeight = message.lastValidBlockHeight); return obj; }, - create, I>>( - base?: I - ): GetLatestBlockhashResponse { + create, I>>(base?: I): GetLatestBlockhashResponse { return GetLatestBlockhashResponse.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): GetLatestBlockhashResponse { + fromPartial, I>>(object: I): GetLatestBlockhashResponse { const message = createBaseGetLatestBlockhashResponse(); message.slot = object.slot ?? "0"; message.blockhash = object.blockhash ?? ""; @@ -4616,22 +3803,15 @@ function createBaseGetBlockHeightRequest(): GetBlockHeightRequest { } export const GetBlockHeightRequest = { - encode( - message: GetBlockHeightRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetBlockHeightRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.commitment !== undefined) { writer.uint32(8).int32(message.commitment); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetBlockHeightRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockHeightRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetBlockHeightRequest(); while (reader.pos < end) { @@ -4654,32 +3834,21 @@ export const GetBlockHeightRequest = { }, fromJSON(object: any): GetBlockHeightRequest { - return { - commitment: isSet(object.commitment) - ? commitmentLevelFromJSON(object.commitment) - : undefined, - }; + return { commitment: isSet(object.commitment) ? commitmentLevelFromJSON(object.commitment) : undefined }; }, toJSON(message: GetBlockHeightRequest): unknown { const obj: any = {}; message.commitment !== undefined && - (obj.commitment = - message.commitment !== undefined - ? commitmentLevelToJSON(message.commitment) - : undefined); + (obj.commitment = message.commitment !== undefined ? commitmentLevelToJSON(message.commitment) : undefined); return obj; }, - create, I>>( - base?: I - ): GetBlockHeightRequest { + create, I>>(base?: I): GetBlockHeightRequest { return GetBlockHeightRequest.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): GetBlockHeightRequest { + fromPartial, I>>(object: I): GetBlockHeightRequest { const message = createBaseGetBlockHeightRequest(); message.commitment = object.commitment ?? undefined; return message; @@ -4691,22 +3860,15 @@ function createBaseGetBlockHeightResponse(): GetBlockHeightResponse { } export const GetBlockHeightResponse = { - encode( - message: GetBlockHeightResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetBlockHeightResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.blockHeight !== "0") { writer.uint32(8).uint64(message.blockHeight); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetBlockHeightResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockHeightResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetBlockHeightResponse(); while (reader.pos < end) { @@ -4729,27 +3891,20 @@ export const GetBlockHeightResponse = { }, fromJSON(object: any): GetBlockHeightResponse { - return { - blockHeight: isSet(object.blockHeight) ? String(object.blockHeight) : "0", - }; + return { blockHeight: isSet(object.blockHeight) ? String(object.blockHeight) : "0" }; }, toJSON(message: GetBlockHeightResponse): unknown { const obj: any = {}; - message.blockHeight !== undefined && - (obj.blockHeight = message.blockHeight); + message.blockHeight !== undefined && (obj.blockHeight = message.blockHeight); return obj; }, - create, I>>( - base?: I - ): GetBlockHeightResponse { + create, I>>(base?: I): GetBlockHeightResponse { return GetBlockHeightResponse.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): GetBlockHeightResponse { + fromPartial, I>>(object: I): GetBlockHeightResponse { const message = createBaseGetBlockHeightResponse(); message.blockHeight = object.blockHeight ?? "0"; return message; @@ -4761,10 +3916,7 @@ function createBaseGetSlotRequest(): GetSlotRequest { } export const GetSlotRequest = { - encode( - message: GetSlotRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetSlotRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.commitment !== undefined) { writer.uint32(8).int32(message.commitment); } @@ -4772,8 +3924,7 @@ export const GetSlotRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GetSlotRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetSlotRequest(); while (reader.pos < end) { @@ -4796,32 +3947,21 @@ export const GetSlotRequest = { }, fromJSON(object: any): GetSlotRequest { - return { - commitment: isSet(object.commitment) - ? commitmentLevelFromJSON(object.commitment) - : undefined, - }; + return { commitment: isSet(object.commitment) ? commitmentLevelFromJSON(object.commitment) : undefined }; }, toJSON(message: GetSlotRequest): unknown { const obj: any = {}; message.commitment !== undefined && - (obj.commitment = - message.commitment !== undefined - ? commitmentLevelToJSON(message.commitment) - : undefined); + (obj.commitment = message.commitment !== undefined ? commitmentLevelToJSON(message.commitment) : undefined); return obj; }, - create, I>>( - base?: I - ): GetSlotRequest { + create, I>>(base?: I): GetSlotRequest { return GetSlotRequest.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): GetSlotRequest { + fromPartial, I>>(object: I): GetSlotRequest { const message = createBaseGetSlotRequest(); message.commitment = object.commitment ?? undefined; return message; @@ -4833,10 +3973,7 @@ function createBaseGetSlotResponse(): GetSlotResponse { } export const GetSlotResponse = { - encode( - message: GetSlotResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetSlotResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.slot !== "0") { writer.uint32(8).uint64(message.slot); } @@ -4844,8 +3981,7 @@ export const GetSlotResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GetSlotResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetSlotResponse(); while (reader.pos < end) { @@ -4877,15 +4013,11 @@ export const GetSlotResponse = { return obj; }, - create, I>>( - base?: I - ): GetSlotResponse { + create, I>>(base?: I): GetSlotResponse { return GetSlotResponse.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): GetSlotResponse { + fromPartial, I>>(object: I): GetSlotResponse { const message = createBaseGetSlotResponse(); message.slot = object.slot ?? "0"; return message; @@ -4897,16 +4029,12 @@ function createBaseGetVersionRequest(): GetVersionRequest { } export const GetVersionRequest = { - encode( - _: GetVersionRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: GetVersionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GetVersionRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetVersionRequest(); while (reader.pos < end) { @@ -4930,15 +4058,11 @@ export const GetVersionRequest = { return obj; }, - create, I>>( - base?: I - ): GetVersionRequest { + create, I>>(base?: I): GetVersionRequest { return GetVersionRequest.fromPartial(base ?? {}); }, - fromPartial, I>>( - _: I - ): GetVersionRequest { + fromPartial, I>>(_: I): GetVersionRequest { const message = createBaseGetVersionRequest(); return message; }, @@ -4949,10 +4073,7 @@ function createBaseGetVersionResponse(): GetVersionResponse { } export const GetVersionResponse = { - encode( - message: GetVersionResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetVersionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.version !== "") { writer.uint32(10).string(message.version); } @@ -4960,8 +4081,7 @@ export const GetVersionResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GetVersionResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetVersionResponse(); while (reader.pos < end) { @@ -4993,15 +4113,11 @@ export const GetVersionResponse = { return obj; }, - create, I>>( - base?: I - ): GetVersionResponse { + create, I>>(base?: I): GetVersionResponse { return GetVersionResponse.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): GetVersionResponse { + fromPartial, I>>(object: I): GetVersionResponse { const message = createBaseGetVersionResponse(); message.version = object.version ?? ""; return message; @@ -5013,10 +4129,7 @@ function createBaseIsBlockhashValidRequest(): IsBlockhashValidRequest { } export const IsBlockhashValidRequest = { - encode( - message: IsBlockhashValidRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: IsBlockhashValidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.blockhash !== "") { writer.uint32(10).string(message.blockhash); } @@ -5026,12 +4139,8 @@ export const IsBlockhashValidRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): IsBlockhashValidRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): IsBlockhashValidRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseIsBlockhashValidRequest(); while (reader.pos < end) { @@ -5063,9 +4172,7 @@ export const IsBlockhashValidRequest = { fromJSON(object: any): IsBlockhashValidRequest { return { blockhash: isSet(object.blockhash) ? String(object.blockhash) : "", - commitment: isSet(object.commitment) - ? commitmentLevelFromJSON(object.commitment) - : undefined, + commitment: isSet(object.commitment) ? commitmentLevelFromJSON(object.commitment) : undefined, }; }, @@ -5073,22 +4180,15 @@ export const IsBlockhashValidRequest = { const obj: any = {}; message.blockhash !== undefined && (obj.blockhash = message.blockhash); message.commitment !== undefined && - (obj.commitment = - message.commitment !== undefined - ? commitmentLevelToJSON(message.commitment) - : undefined); + (obj.commitment = message.commitment !== undefined ? commitmentLevelToJSON(message.commitment) : undefined); return obj; }, - create, I>>( - base?: I - ): IsBlockhashValidRequest { + create, I>>(base?: I): IsBlockhashValidRequest { return IsBlockhashValidRequest.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): IsBlockhashValidRequest { + fromPartial, I>>(object: I): IsBlockhashValidRequest { const message = createBaseIsBlockhashValidRequest(); message.blockhash = object.blockhash ?? ""; message.commitment = object.commitment ?? undefined; @@ -5101,10 +4201,7 @@ function createBaseIsBlockhashValidResponse(): IsBlockhashValidResponse { } export const IsBlockhashValidResponse = { - encode( - message: IsBlockhashValidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: IsBlockhashValidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.slot !== "0") { writer.uint32(8).uint64(message.slot); } @@ -5114,12 +4211,8 @@ export const IsBlockhashValidResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): IsBlockhashValidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): IsBlockhashValidResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseIsBlockhashValidResponse(); while (reader.pos < end) { @@ -5162,15 +4255,11 @@ export const IsBlockhashValidResponse = { return obj; }, - create, I>>( - base?: I - ): IsBlockhashValidResponse { + create, I>>(base?: I): IsBlockhashValidResponse { return IsBlockhashValidResponse.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): IsBlockhashValidResponse { + fromPartial, I>>(object: I): IsBlockhashValidResponse { const message = createBaseIsBlockhashValidResponse(); message.slot = object.slot ?? "0"; message.valid = object.valid ?? false; @@ -5184,22 +4273,18 @@ export const GeyserService = { path: "/geyser.Geyser/Subscribe", requestStream: true, responseStream: true, - requestSerialize: (value: SubscribeRequest) => - Buffer.from(SubscribeRequest.encode(value).finish()), + requestSerialize: (value: SubscribeRequest) => Buffer.from(SubscribeRequest.encode(value).finish()), requestDeserialize: (value: Buffer) => SubscribeRequest.decode(value), - responseSerialize: (value: SubscribeUpdate) => - Buffer.from(SubscribeUpdate.encode(value).finish()), + responseSerialize: (value: SubscribeUpdate) => Buffer.from(SubscribeUpdate.encode(value).finish()), responseDeserialize: (value: Buffer) => SubscribeUpdate.decode(value), }, ping: { path: "/geyser.Geyser/Ping", requestStream: false, responseStream: false, - requestSerialize: (value: PingRequest) => - Buffer.from(PingRequest.encode(value).finish()), + requestSerialize: (value: PingRequest) => Buffer.from(PingRequest.encode(value).finish()), requestDeserialize: (value: Buffer) => PingRequest.decode(value), - responseSerialize: (value: PongResponse) => - Buffer.from(PongResponse.encode(value).finish()), + responseSerialize: (value: PongResponse) => Buffer.from(PongResponse.encode(value).finish()), responseDeserialize: (value: Buffer) => PongResponse.decode(value), }, getLatestBlockhash: { @@ -5208,58 +4293,46 @@ export const GeyserService = { responseStream: false, requestSerialize: (value: GetLatestBlockhashRequest) => Buffer.from(GetLatestBlockhashRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => - GetLatestBlockhashRequest.decode(value), + requestDeserialize: (value: Buffer) => GetLatestBlockhashRequest.decode(value), responseSerialize: (value: GetLatestBlockhashResponse) => Buffer.from(GetLatestBlockhashResponse.encode(value).finish()), - responseDeserialize: (value: Buffer) => - GetLatestBlockhashResponse.decode(value), + responseDeserialize: (value: Buffer) => GetLatestBlockhashResponse.decode(value), }, getBlockHeight: { path: "/geyser.Geyser/GetBlockHeight", requestStream: false, responseStream: false, - requestSerialize: (value: GetBlockHeightRequest) => - Buffer.from(GetBlockHeightRequest.encode(value).finish()), + requestSerialize: (value: GetBlockHeightRequest) => Buffer.from(GetBlockHeightRequest.encode(value).finish()), requestDeserialize: (value: Buffer) => GetBlockHeightRequest.decode(value), - responseSerialize: (value: GetBlockHeightResponse) => - Buffer.from(GetBlockHeightResponse.encode(value).finish()), - responseDeserialize: (value: Buffer) => - GetBlockHeightResponse.decode(value), + responseSerialize: (value: GetBlockHeightResponse) => Buffer.from(GetBlockHeightResponse.encode(value).finish()), + responseDeserialize: (value: Buffer) => GetBlockHeightResponse.decode(value), }, getSlot: { path: "/geyser.Geyser/GetSlot", requestStream: false, responseStream: false, - requestSerialize: (value: GetSlotRequest) => - Buffer.from(GetSlotRequest.encode(value).finish()), + requestSerialize: (value: GetSlotRequest) => Buffer.from(GetSlotRequest.encode(value).finish()), requestDeserialize: (value: Buffer) => GetSlotRequest.decode(value), - responseSerialize: (value: GetSlotResponse) => - Buffer.from(GetSlotResponse.encode(value).finish()), + responseSerialize: (value: GetSlotResponse) => Buffer.from(GetSlotResponse.encode(value).finish()), responseDeserialize: (value: Buffer) => GetSlotResponse.decode(value), }, isBlockhashValid: { path: "/geyser.Geyser/IsBlockhashValid", requestStream: false, responseStream: false, - requestSerialize: (value: IsBlockhashValidRequest) => - Buffer.from(IsBlockhashValidRequest.encode(value).finish()), - requestDeserialize: (value: Buffer) => - IsBlockhashValidRequest.decode(value), + requestSerialize: (value: IsBlockhashValidRequest) => Buffer.from(IsBlockhashValidRequest.encode(value).finish()), + requestDeserialize: (value: Buffer) => IsBlockhashValidRequest.decode(value), responseSerialize: (value: IsBlockhashValidResponse) => Buffer.from(IsBlockhashValidResponse.encode(value).finish()), - responseDeserialize: (value: Buffer) => - IsBlockhashValidResponse.decode(value), + responseDeserialize: (value: Buffer) => IsBlockhashValidResponse.decode(value), }, getVersion: { path: "/geyser.Geyser/GetVersion", requestStream: false, responseStream: false, - requestSerialize: (value: GetVersionRequest) => - Buffer.from(GetVersionRequest.encode(value).finish()), + requestSerialize: (value: GetVersionRequest) => Buffer.from(GetVersionRequest.encode(value).finish()), requestDeserialize: (value: Buffer) => GetVersionRequest.decode(value), - responseSerialize: (value: GetVersionResponse) => - Buffer.from(GetVersionResponse.encode(value).finish()), + responseSerialize: (value: GetVersionResponse) => Buffer.from(GetVersionResponse.encode(value).finish()), responseDeserialize: (value: Buffer) => GetVersionResponse.decode(value), }, } as const; @@ -5267,159 +4340,108 @@ export const GeyserService = { export interface GeyserServer extends UntypedServiceImplementation { subscribe: handleBidiStreamingCall; ping: handleUnaryCall; - getLatestBlockhash: handleUnaryCall< - GetLatestBlockhashRequest, - GetLatestBlockhashResponse - >; - getBlockHeight: handleUnaryCall< - GetBlockHeightRequest, - GetBlockHeightResponse - >; + getLatestBlockhash: handleUnaryCall; + getBlockHeight: handleUnaryCall; getSlot: handleUnaryCall; - isBlockhashValid: handleUnaryCall< - IsBlockhashValidRequest, - IsBlockhashValidResponse - >; + isBlockhashValid: handleUnaryCall; getVersion: handleUnaryCall; } export interface GeyserClient extends Client { subscribe(): ClientDuplexStream; - subscribe( - options: Partial - ): ClientDuplexStream; - subscribe( - metadata: Metadata, - options?: Partial - ): ClientDuplexStream; - ping( - request: PingRequest, - callback: (error: ServiceError | null, response: PongResponse) => void - ): ClientUnaryCall; + subscribe(options: Partial): ClientDuplexStream; + subscribe(metadata: Metadata, options?: Partial): ClientDuplexStream; + ping(request: PingRequest, callback: (error: ServiceError | null, response: PongResponse) => void): ClientUnaryCall; ping( request: PingRequest, metadata: Metadata, - callback: (error: ServiceError | null, response: PongResponse) => void + callback: (error: ServiceError | null, response: PongResponse) => void, ): ClientUnaryCall; ping( request: PingRequest, metadata: Metadata, options: Partial, - callback: (error: ServiceError | null, response: PongResponse) => void + callback: (error: ServiceError | null, response: PongResponse) => void, ): ClientUnaryCall; getLatestBlockhash( request: GetLatestBlockhashRequest, - callback: ( - error: ServiceError | null, - response: GetLatestBlockhashResponse - ) => void + callback: (error: ServiceError | null, response: GetLatestBlockhashResponse) => void, ): ClientUnaryCall; getLatestBlockhash( request: GetLatestBlockhashRequest, metadata: Metadata, - callback: ( - error: ServiceError | null, - response: GetLatestBlockhashResponse - ) => void + callback: (error: ServiceError | null, response: GetLatestBlockhashResponse) => void, ): ClientUnaryCall; getLatestBlockhash( request: GetLatestBlockhashRequest, metadata: Metadata, options: Partial, - callback: ( - error: ServiceError | null, - response: GetLatestBlockhashResponse - ) => void + callback: (error: ServiceError | null, response: GetLatestBlockhashResponse) => void, ): ClientUnaryCall; getBlockHeight( request: GetBlockHeightRequest, - callback: ( - error: ServiceError | null, - response: GetBlockHeightResponse - ) => void + callback: (error: ServiceError | null, response: GetBlockHeightResponse) => void, ): ClientUnaryCall; getBlockHeight( request: GetBlockHeightRequest, metadata: Metadata, - callback: ( - error: ServiceError | null, - response: GetBlockHeightResponse - ) => void + callback: (error: ServiceError | null, response: GetBlockHeightResponse) => void, ): ClientUnaryCall; getBlockHeight( request: GetBlockHeightRequest, metadata: Metadata, options: Partial, - callback: ( - error: ServiceError | null, - response: GetBlockHeightResponse - ) => void + callback: (error: ServiceError | null, response: GetBlockHeightResponse) => void, ): ClientUnaryCall; getSlot( request: GetSlotRequest, - callback: (error: ServiceError | null, response: GetSlotResponse) => void + callback: (error: ServiceError | null, response: GetSlotResponse) => void, ): ClientUnaryCall; getSlot( request: GetSlotRequest, metadata: Metadata, - callback: (error: ServiceError | null, response: GetSlotResponse) => void + callback: (error: ServiceError | null, response: GetSlotResponse) => void, ): ClientUnaryCall; getSlot( request: GetSlotRequest, metadata: Metadata, options: Partial, - callback: (error: ServiceError | null, response: GetSlotResponse) => void + callback: (error: ServiceError | null, response: GetSlotResponse) => void, ): ClientUnaryCall; isBlockhashValid( request: IsBlockhashValidRequest, - callback: ( - error: ServiceError | null, - response: IsBlockhashValidResponse - ) => void + callback: (error: ServiceError | null, response: IsBlockhashValidResponse) => void, ): ClientUnaryCall; isBlockhashValid( request: IsBlockhashValidRequest, metadata: Metadata, - callback: ( - error: ServiceError | null, - response: IsBlockhashValidResponse - ) => void + callback: (error: ServiceError | null, response: IsBlockhashValidResponse) => void, ): ClientUnaryCall; isBlockhashValid( request: IsBlockhashValidRequest, metadata: Metadata, options: Partial, - callback: ( - error: ServiceError | null, - response: IsBlockhashValidResponse - ) => void + callback: (error: ServiceError | null, response: IsBlockhashValidResponse) => void, ): ClientUnaryCall; getVersion( request: GetVersionRequest, - callback: (error: ServiceError | null, response: GetVersionResponse) => void + callback: (error: ServiceError | null, response: GetVersionResponse) => void, ): ClientUnaryCall; getVersion( request: GetVersionRequest, metadata: Metadata, - callback: (error: ServiceError | null, response: GetVersionResponse) => void + callback: (error: ServiceError | null, response: GetVersionResponse) => void, ): ClientUnaryCall; getVersion( request: GetVersionRequest, metadata: Metadata, options: Partial, - callback: (error: ServiceError | null, response: GetVersionResponse) => void + callback: (error: ServiceError | null, response: GetVersionResponse) => void, ): ClientUnaryCall; } -export const GeyserClient = makeGenericClientConstructor( - GeyserService, - "geyser.Geyser" -) as unknown as { - new ( - address: string, - credentials: ChannelCredentials, - options?: Partial - ): GeyserClient; +export const GeyserClient = makeGenericClientConstructor(GeyserService, "geyser.Geyser") as unknown as { + new (address: string, credentials: ChannelCredentials, options?: Partial): GeyserClient; service: typeof GeyserService; }; @@ -5467,31 +4489,16 @@ function base64FromBytes(arr: Uint8Array): string { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } : Partial; type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { - [K in Exclude>]: never; - }; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; function longToString(long: Long) { return long.toString(); diff --git a/yellowstone-grpc-client-nodejs/src/grpc/solana-storage.ts b/yellowstone-grpc-client-nodejs/src/grpc/solana-storage.ts index 1014cc69..0a089228 100644 --- a/yellowstone-grpc-client-nodejs/src/grpc/solana-storage.ts +++ b/yellowstone-grpc-client-nodejs/src/grpc/solana-storage.ts @@ -63,6 +63,7 @@ export interface ConfirmedBlock { rewards: Reward[]; blockTime: UnixTimestamp | undefined; blockHeight: BlockHeight | undefined; + numPartitions: NumPartitions | undefined; } export interface ConfirmedTransaction { @@ -177,6 +178,7 @@ export interface Reward { export interface Rewards { rewards: Reward[]; + numPartitions: NumPartitions | undefined; } export interface UnixTimestamp { @@ -187,6 +189,10 @@ export interface BlockHeight { blockHeight: string; } +export interface NumPartitions { + numPartitions: string; +} + function createBaseConfirmedBlock(): ConfirmedBlock { return { previousBlockhash: "", @@ -196,14 +202,12 @@ function createBaseConfirmedBlock(): ConfirmedBlock { rewards: [], blockTime: undefined, blockHeight: undefined, + numPartitions: undefined, }; } export const ConfirmedBlock = { - encode( - message: ConfirmedBlock, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ConfirmedBlock, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.previousBlockhash !== "") { writer.uint32(10).string(message.previousBlockhash); } @@ -220,23 +224,19 @@ export const ConfirmedBlock = { Reward.encode(v!, writer.uint32(42).fork()).ldelim(); } if (message.blockTime !== undefined) { - UnixTimestamp.encode( - message.blockTime, - writer.uint32(50).fork() - ).ldelim(); + UnixTimestamp.encode(message.blockTime, writer.uint32(50).fork()).ldelim(); } if (message.blockHeight !== undefined) { - BlockHeight.encode( - message.blockHeight, - writer.uint32(58).fork() - ).ldelim(); + BlockHeight.encode(message.blockHeight, writer.uint32(58).fork()).ldelim(); + } + if (message.numPartitions !== undefined) { + NumPartitions.encode(message.numPartitions, writer.uint32(66).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ConfirmedBlock { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConfirmedBlock(); while (reader.pos < end) { @@ -268,9 +268,7 @@ export const ConfirmedBlock = { break; } - message.transactions.push( - ConfirmedTransaction.decode(reader, reader.uint32()) - ); + message.transactions.push(ConfirmedTransaction.decode(reader, reader.uint32())); continue; case 5: if (tag !== 42) { @@ -293,6 +291,13 @@ export const ConfirmedBlock = { message.blockHeight = BlockHeight.decode(reader, reader.uint32()); continue; + case 8: + if (tag !== 66) { + break; + } + + message.numPartitions = NumPartitions.decode(reader, reader.uint32()); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -304,82 +309,63 @@ export const ConfirmedBlock = { fromJSON(object: any): ConfirmedBlock { return { - previousBlockhash: isSet(object.previousBlockhash) - ? String(object.previousBlockhash) - : "", + previousBlockhash: isSet(object.previousBlockhash) ? String(object.previousBlockhash) : "", blockhash: isSet(object.blockhash) ? String(object.blockhash) : "", parentSlot: isSet(object.parentSlot) ? String(object.parentSlot) : "0", transactions: Array.isArray(object?.transactions) ? object.transactions.map((e: any) => ConfirmedTransaction.fromJSON(e)) : [], - rewards: Array.isArray(object?.rewards) - ? object.rewards.map((e: any) => Reward.fromJSON(e)) - : [], - blockTime: isSet(object.blockTime) - ? UnixTimestamp.fromJSON(object.blockTime) - : undefined, - blockHeight: isSet(object.blockHeight) - ? BlockHeight.fromJSON(object.blockHeight) - : undefined, + rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => Reward.fromJSON(e)) : [], + blockTime: isSet(object.blockTime) ? UnixTimestamp.fromJSON(object.blockTime) : undefined, + blockHeight: isSet(object.blockHeight) ? BlockHeight.fromJSON(object.blockHeight) : undefined, + numPartitions: isSet(object.numPartitions) ? NumPartitions.fromJSON(object.numPartitions) : undefined, }; }, toJSON(message: ConfirmedBlock): unknown { const obj: any = {}; - message.previousBlockhash !== undefined && - (obj.previousBlockhash = message.previousBlockhash); + message.previousBlockhash !== undefined && (obj.previousBlockhash = message.previousBlockhash); message.blockhash !== undefined && (obj.blockhash = message.blockhash); message.parentSlot !== undefined && (obj.parentSlot = message.parentSlot); if (message.transactions) { - obj.transactions = message.transactions.map((e) => - e ? ConfirmedTransaction.toJSON(e) : undefined - ); + obj.transactions = message.transactions.map((e) => e ? ConfirmedTransaction.toJSON(e) : undefined); } else { obj.transactions = []; } if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? Reward.toJSON(e) : undefined - ); + obj.rewards = message.rewards.map((e) => e ? Reward.toJSON(e) : undefined); } else { obj.rewards = []; } message.blockTime !== undefined && - (obj.blockTime = message.blockTime - ? UnixTimestamp.toJSON(message.blockTime) - : undefined); + (obj.blockTime = message.blockTime ? UnixTimestamp.toJSON(message.blockTime) : undefined); message.blockHeight !== undefined && - (obj.blockHeight = message.blockHeight - ? BlockHeight.toJSON(message.blockHeight) - : undefined); + (obj.blockHeight = message.blockHeight ? BlockHeight.toJSON(message.blockHeight) : undefined); + message.numPartitions !== undefined && + (obj.numPartitions = message.numPartitions ? NumPartitions.toJSON(message.numPartitions) : undefined); return obj; }, - create, I>>( - base?: I - ): ConfirmedBlock { + create, I>>(base?: I): ConfirmedBlock { return ConfirmedBlock.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): ConfirmedBlock { + fromPartial, I>>(object: I): ConfirmedBlock { const message = createBaseConfirmedBlock(); message.previousBlockhash = object.previousBlockhash ?? ""; message.blockhash = object.blockhash ?? ""; message.parentSlot = object.parentSlot ?? "0"; - message.transactions = - object.transactions?.map((e) => ConfirmedTransaction.fromPartial(e)) || - []; + message.transactions = object.transactions?.map((e) => ConfirmedTransaction.fromPartial(e)) || []; message.rewards = object.rewards?.map((e) => Reward.fromPartial(e)) || []; - message.blockTime = - object.blockTime !== undefined && object.blockTime !== null - ? UnixTimestamp.fromPartial(object.blockTime) - : undefined; - message.blockHeight = - object.blockHeight !== undefined && object.blockHeight !== null - ? BlockHeight.fromPartial(object.blockHeight) - : undefined; + message.blockTime = (object.blockTime !== undefined && object.blockTime !== null) + ? UnixTimestamp.fromPartial(object.blockTime) + : undefined; + message.blockHeight = (object.blockHeight !== undefined && object.blockHeight !== null) + ? BlockHeight.fromPartial(object.blockHeight) + : undefined; + message.numPartitions = (object.numPartitions !== undefined && object.numPartitions !== null) + ? NumPartitions.fromPartial(object.numPartitions) + : undefined; return message; }, }; @@ -389,31 +375,18 @@ function createBaseConfirmedTransaction(): ConfirmedTransaction { } export const ConfirmedTransaction = { - encode( - message: ConfirmedTransaction, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ConfirmedTransaction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.transaction !== undefined) { - Transaction.encode( - message.transaction, - writer.uint32(10).fork() - ).ldelim(); + Transaction.encode(message.transaction, writer.uint32(10).fork()).ldelim(); } if (message.meta !== undefined) { - TransactionStatusMeta.encode( - message.meta, - writer.uint32(18).fork() - ).ldelim(); + TransactionStatusMeta.encode(message.meta, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ConfirmedTransaction { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ConfirmedTransaction { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConfirmedTransaction(); while (reader.pos < end) { @@ -444,46 +417,31 @@ export const ConfirmedTransaction = { fromJSON(object: any): ConfirmedTransaction { return { - transaction: isSet(object.transaction) - ? Transaction.fromJSON(object.transaction) - : undefined, - meta: isSet(object.meta) - ? TransactionStatusMeta.fromJSON(object.meta) - : undefined, + transaction: isSet(object.transaction) ? Transaction.fromJSON(object.transaction) : undefined, + meta: isSet(object.meta) ? TransactionStatusMeta.fromJSON(object.meta) : undefined, }; }, toJSON(message: ConfirmedTransaction): unknown { const obj: any = {}; message.transaction !== undefined && - (obj.transaction = message.transaction - ? Transaction.toJSON(message.transaction) - : undefined); - message.meta !== undefined && - (obj.meta = message.meta - ? TransactionStatusMeta.toJSON(message.meta) - : undefined); + (obj.transaction = message.transaction ? Transaction.toJSON(message.transaction) : undefined); + message.meta !== undefined && (obj.meta = message.meta ? TransactionStatusMeta.toJSON(message.meta) : undefined); return obj; }, - create, I>>( - base?: I - ): ConfirmedTransaction { + create, I>>(base?: I): ConfirmedTransaction { return ConfirmedTransaction.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): ConfirmedTransaction { + fromPartial, I>>(object: I): ConfirmedTransaction { const message = createBaseConfirmedTransaction(); - message.transaction = - object.transaction !== undefined && object.transaction !== null - ? Transaction.fromPartial(object.transaction) - : undefined; - message.meta = - object.meta !== undefined && object.meta !== null - ? TransactionStatusMeta.fromPartial(object.meta) - : undefined; + message.transaction = (object.transaction !== undefined && object.transaction !== null) + ? Transaction.fromPartial(object.transaction) + : undefined; + message.meta = (object.meta !== undefined && object.meta !== null) + ? TransactionStatusMeta.fromPartial(object.meta) + : undefined; return message; }, }; @@ -493,10 +451,7 @@ function createBaseTransaction(): Transaction { } export const Transaction = { - encode( - message: Transaction, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Transaction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.signatures) { writer.uint32(10).bytes(v!); } @@ -507,8 +462,7 @@ export const Transaction = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Transaction { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTransaction(); while (reader.pos < end) { @@ -539,28 +493,19 @@ export const Transaction = { fromJSON(object: any): Transaction { return { - signatures: Array.isArray(object?.signatures) - ? object.signatures.map((e: any) => bytesFromBase64(e)) - : [], - message: isSet(object.message) - ? Message.fromJSON(object.message) - : undefined, + signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => bytesFromBase64(e)) : [], + message: isSet(object.message) ? Message.fromJSON(object.message) : undefined, }; }, toJSON(message: Transaction): unknown { const obj: any = {}; if (message.signatures) { - obj.signatures = message.signatures.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array(0)) - ); + obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array(0))); } else { obj.signatures = []; } - message.message !== undefined && - (obj.message = message.message - ? Message.toJSON(message.message) - : undefined); + message.message !== undefined && (obj.message = message.message ? Message.toJSON(message.message) : undefined); return obj; }, @@ -568,15 +513,12 @@ export const Transaction = { return Transaction.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): Transaction { + fromPartial, I>>(object: I): Transaction { const message = createBaseTransaction(); message.signatures = object.signatures?.map((e) => e) || []; - message.message = - object.message !== undefined && object.message !== null - ? Message.fromPartial(object.message) - : undefined; + message.message = (object.message !== undefined && object.message !== null) + ? Message.fromPartial(object.message) + : undefined; return message; }, }; @@ -593,10 +535,7 @@ function createBaseMessage(): Message { } export const Message = { - encode( - message: Message, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Message, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.header !== undefined) { MessageHeader.encode(message.header, writer.uint32(10).fork()).ldelim(); } @@ -619,8 +558,7 @@ export const Message = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Message { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessage(); while (reader.pos < end) { @@ -652,9 +590,7 @@ export const Message = { break; } - message.instructions.push( - CompiledInstruction.decode(reader, reader.uint32()) - ); + message.instructions.push(CompiledInstruction.decode(reader, reader.uint32())); continue; case 5: if (tag !== 40) { @@ -668,9 +604,7 @@ export const Message = { break; } - message.addressTableLookups.push( - MessageAddressTableLookup.decode(reader, reader.uint32()) - ); + message.addressTableLookups.push(MessageAddressTableLookup.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -683,50 +617,33 @@ export const Message = { fromJSON(object: any): Message { return { - header: isSet(object.header) - ? MessageHeader.fromJSON(object.header) - : undefined, - accountKeys: Array.isArray(object?.accountKeys) - ? object.accountKeys.map((e: any) => bytesFromBase64(e)) - : [], - recentBlockhash: isSet(object.recentBlockhash) - ? bytesFromBase64(object.recentBlockhash) - : new Uint8Array(0), + header: isSet(object.header) ? MessageHeader.fromJSON(object.header) : undefined, + accountKeys: Array.isArray(object?.accountKeys) ? object.accountKeys.map((e: any) => bytesFromBase64(e)) : [], + recentBlockhash: isSet(object.recentBlockhash) ? bytesFromBase64(object.recentBlockhash) : new Uint8Array(0), instructions: Array.isArray(object?.instructions) ? object.instructions.map((e: any) => CompiledInstruction.fromJSON(e)) : [], versioned: isSet(object.versioned) ? Boolean(object.versioned) : false, addressTableLookups: Array.isArray(object?.addressTableLookups) - ? object.addressTableLookups.map((e: any) => - MessageAddressTableLookup.fromJSON(e) - ) + ? object.addressTableLookups.map((e: any) => MessageAddressTableLookup.fromJSON(e)) : [], }; }, toJSON(message: Message): unknown { const obj: any = {}; - message.header !== undefined && - (obj.header = message.header - ? MessageHeader.toJSON(message.header) - : undefined); + message.header !== undefined && (obj.header = message.header ? MessageHeader.toJSON(message.header) : undefined); if (message.accountKeys) { - obj.accountKeys = message.accountKeys.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array(0)) - ); + obj.accountKeys = message.accountKeys.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array(0))); } else { obj.accountKeys = []; } message.recentBlockhash !== undefined && (obj.recentBlockhash = base64FromBytes( - message.recentBlockhash !== undefined - ? message.recentBlockhash - : new Uint8Array(0) + message.recentBlockhash !== undefined ? message.recentBlockhash : new Uint8Array(0), )); if (message.instructions) { - obj.instructions = message.instructions.map((e) => - e ? CompiledInstruction.toJSON(e) : undefined - ); + obj.instructions = message.instructions.map((e) => e ? CompiledInstruction.toJSON(e) : undefined); } else { obj.instructions = []; } @@ -747,36 +664,25 @@ export const Message = { fromPartial, I>>(object: I): Message { const message = createBaseMessage(); - message.header = - object.header !== undefined && object.header !== null - ? MessageHeader.fromPartial(object.header) - : undefined; + message.header = (object.header !== undefined && object.header !== null) + ? MessageHeader.fromPartial(object.header) + : undefined; message.accountKeys = object.accountKeys?.map((e) => e) || []; message.recentBlockhash = object.recentBlockhash ?? new Uint8Array(0); - message.instructions = - object.instructions?.map((e) => CompiledInstruction.fromPartial(e)) || []; + message.instructions = object.instructions?.map((e) => CompiledInstruction.fromPartial(e)) || []; message.versioned = object.versioned ?? false; - message.addressTableLookups = - object.addressTableLookups?.map((e) => - MessageAddressTableLookup.fromPartial(e) - ) || []; + message.addressTableLookups = object.addressTableLookups?.map((e) => MessageAddressTableLookup.fromPartial(e)) || + []; return message; }, }; function createBaseMessageHeader(): MessageHeader { - return { - numRequiredSignatures: 0, - numReadonlySignedAccounts: 0, - numReadonlyUnsignedAccounts: 0, - }; + return { numRequiredSignatures: 0, numReadonlySignedAccounts: 0, numReadonlyUnsignedAccounts: 0 }; } export const MessageHeader = { - encode( - message: MessageHeader, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MessageHeader, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.numRequiredSignatures !== 0) { writer.uint32(8).uint32(message.numRequiredSignatures); } @@ -790,8 +696,7 @@ export const MessageHeader = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MessageHeader { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessageHeader(); while (reader.pos < end) { @@ -829,12 +734,8 @@ export const MessageHeader = { fromJSON(object: any): MessageHeader { return { - numRequiredSignatures: isSet(object.numRequiredSignatures) - ? Number(object.numRequiredSignatures) - : 0, - numReadonlySignedAccounts: isSet(object.numReadonlySignedAccounts) - ? Number(object.numReadonlySignedAccounts) - : 0, + numRequiredSignatures: isSet(object.numRequiredSignatures) ? Number(object.numRequiredSignatures) : 0, + numReadonlySignedAccounts: isSet(object.numReadonlySignedAccounts) ? Number(object.numReadonlySignedAccounts) : 0, numReadonlyUnsignedAccounts: isSet(object.numReadonlyUnsignedAccounts) ? Number(object.numReadonlyUnsignedAccounts) : 0, @@ -846,47 +747,31 @@ export const MessageHeader = { message.numRequiredSignatures !== undefined && (obj.numRequiredSignatures = Math.round(message.numRequiredSignatures)); message.numReadonlySignedAccounts !== undefined && - (obj.numReadonlySignedAccounts = Math.round( - message.numReadonlySignedAccounts - )); + (obj.numReadonlySignedAccounts = Math.round(message.numReadonlySignedAccounts)); message.numReadonlyUnsignedAccounts !== undefined && - (obj.numReadonlyUnsignedAccounts = Math.round( - message.numReadonlyUnsignedAccounts - )); + (obj.numReadonlyUnsignedAccounts = Math.round(message.numReadonlyUnsignedAccounts)); return obj; }, - create, I>>( - base?: I - ): MessageHeader { + create, I>>(base?: I): MessageHeader { return MessageHeader.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): MessageHeader { + fromPartial, I>>(object: I): MessageHeader { const message = createBaseMessageHeader(); message.numRequiredSignatures = object.numRequiredSignatures ?? 0; message.numReadonlySignedAccounts = object.numReadonlySignedAccounts ?? 0; - message.numReadonlyUnsignedAccounts = - object.numReadonlyUnsignedAccounts ?? 0; + message.numReadonlyUnsignedAccounts = object.numReadonlyUnsignedAccounts ?? 0; return message; }, }; function createBaseMessageAddressTableLookup(): MessageAddressTableLookup { - return { - accountKey: new Uint8Array(0), - writableIndexes: new Uint8Array(0), - readonlyIndexes: new Uint8Array(0), - }; + return { accountKey: new Uint8Array(0), writableIndexes: new Uint8Array(0), readonlyIndexes: new Uint8Array(0) }; } export const MessageAddressTableLookup = { - encode( - message: MessageAddressTableLookup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MessageAddressTableLookup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.accountKey.length !== 0) { writer.uint32(10).bytes(message.accountKey); } @@ -899,12 +784,8 @@ export const MessageAddressTableLookup = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MessageAddressTableLookup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MessageAddressTableLookup { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessageAddressTableLookup(); while (reader.pos < end) { @@ -942,50 +823,32 @@ export const MessageAddressTableLookup = { fromJSON(object: any): MessageAddressTableLookup { return { - accountKey: isSet(object.accountKey) - ? bytesFromBase64(object.accountKey) - : new Uint8Array(0), - writableIndexes: isSet(object.writableIndexes) - ? bytesFromBase64(object.writableIndexes) - : new Uint8Array(0), - readonlyIndexes: isSet(object.readonlyIndexes) - ? bytesFromBase64(object.readonlyIndexes) - : new Uint8Array(0), + accountKey: isSet(object.accountKey) ? bytesFromBase64(object.accountKey) : new Uint8Array(0), + writableIndexes: isSet(object.writableIndexes) ? bytesFromBase64(object.writableIndexes) : new Uint8Array(0), + readonlyIndexes: isSet(object.readonlyIndexes) ? bytesFromBase64(object.readonlyIndexes) : new Uint8Array(0), }; }, toJSON(message: MessageAddressTableLookup): unknown { const obj: any = {}; message.accountKey !== undefined && - (obj.accountKey = base64FromBytes( - message.accountKey !== undefined - ? message.accountKey - : new Uint8Array(0) - )); + (obj.accountKey = base64FromBytes(message.accountKey !== undefined ? message.accountKey : new Uint8Array(0))); message.writableIndexes !== undefined && (obj.writableIndexes = base64FromBytes( - message.writableIndexes !== undefined - ? message.writableIndexes - : new Uint8Array(0) + message.writableIndexes !== undefined ? message.writableIndexes : new Uint8Array(0), )); message.readonlyIndexes !== undefined && (obj.readonlyIndexes = base64FromBytes( - message.readonlyIndexes !== undefined - ? message.readonlyIndexes - : new Uint8Array(0) + message.readonlyIndexes !== undefined ? message.readonlyIndexes : new Uint8Array(0), )); return obj; }, - create, I>>( - base?: I - ): MessageAddressTableLookup { + create, I>>(base?: I): MessageAddressTableLookup { return MessageAddressTableLookup.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): MessageAddressTableLookup { + fromPartial, I>>(object: I): MessageAddressTableLookup { const message = createBaseMessageAddressTableLookup(); message.accountKey = object.accountKey ?? new Uint8Array(0); message.writableIndexes = object.writableIndexes ?? new Uint8Array(0); @@ -1016,10 +879,7 @@ function createBaseTransactionStatusMeta(): TransactionStatusMeta { } export const TransactionStatusMeta = { - encode( - message: TransactionStatusMeta, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: TransactionStatusMeta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.err !== undefined) { TransactionError.encode(message.err, writer.uint32(10).fork()).ldelim(); } @@ -1075,12 +935,8 @@ export const TransactionStatusMeta = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): TransactionStatusMeta { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): TransactionStatusMeta { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTransactionStatusMeta(); while (reader.pos < end) { @@ -1139,9 +995,7 @@ export const TransactionStatusMeta = { break; } - message.innerInstructions.push( - InnerInstructions.decode(reader, reader.uint32()) - ); + message.innerInstructions.push(InnerInstructions.decode(reader, reader.uint32())); continue; case 10: if (tag !== 80) { @@ -1169,18 +1023,14 @@ export const TransactionStatusMeta = { break; } - message.preTokenBalances.push( - TokenBalance.decode(reader, reader.uint32()) - ); + message.preTokenBalances.push(TokenBalance.decode(reader, reader.uint32())); continue; case 8: if (tag !== 66) { break; } - message.postTokenBalances.push( - TokenBalance.decode(reader, reader.uint32()) - ); + message.postTokenBalances.push(TokenBalance.decode(reader, reader.uint32())); continue; case 9: if (tag !== 74) { @@ -1235,63 +1085,38 @@ export const TransactionStatusMeta = { fromJSON(object: any): TransactionStatusMeta { return { - err: isSet(object.err) - ? TransactionError.fromJSON(object.err) - : undefined, + err: isSet(object.err) ? TransactionError.fromJSON(object.err) : undefined, fee: isSet(object.fee) ? String(object.fee) : "0", - preBalances: Array.isArray(object?.preBalances) - ? object.preBalances.map((e: any) => String(e)) - : [], - postBalances: Array.isArray(object?.postBalances) - ? object.postBalances.map((e: any) => String(e)) - : [], + preBalances: Array.isArray(object?.preBalances) ? object.preBalances.map((e: any) => String(e)) : [], + postBalances: Array.isArray(object?.postBalances) ? object.postBalances.map((e: any) => String(e)) : [], innerInstructions: Array.isArray(object?.innerInstructions) - ? object.innerInstructions.map((e: any) => - InnerInstructions.fromJSON(e) - ) - : [], - innerInstructionsNone: isSet(object.innerInstructionsNone) - ? Boolean(object.innerInstructionsNone) - : false, - logMessages: Array.isArray(object?.logMessages) - ? object.logMessages.map((e: any) => String(e)) + ? object.innerInstructions.map((e: any) => InnerInstructions.fromJSON(e)) : [], - logMessagesNone: isSet(object.logMessagesNone) - ? Boolean(object.logMessagesNone) - : false, + innerInstructionsNone: isSet(object.innerInstructionsNone) ? Boolean(object.innerInstructionsNone) : false, + logMessages: Array.isArray(object?.logMessages) ? object.logMessages.map((e: any) => String(e)) : [], + logMessagesNone: isSet(object.logMessagesNone) ? Boolean(object.logMessagesNone) : false, preTokenBalances: Array.isArray(object?.preTokenBalances) ? object.preTokenBalances.map((e: any) => TokenBalance.fromJSON(e)) : [], postTokenBalances: Array.isArray(object?.postTokenBalances) ? object.postTokenBalances.map((e: any) => TokenBalance.fromJSON(e)) : [], - rewards: Array.isArray(object?.rewards) - ? object.rewards.map((e: any) => Reward.fromJSON(e)) - : [], + rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => Reward.fromJSON(e)) : [], loadedWritableAddresses: Array.isArray(object?.loadedWritableAddresses) ? object.loadedWritableAddresses.map((e: any) => bytesFromBase64(e)) : [], loadedReadonlyAddresses: Array.isArray(object?.loadedReadonlyAddresses) ? object.loadedReadonlyAddresses.map((e: any) => bytesFromBase64(e)) : [], - returnData: isSet(object.returnData) - ? ReturnData.fromJSON(object.returnData) - : undefined, - returnDataNone: isSet(object.returnDataNone) - ? Boolean(object.returnDataNone) - : false, - computeUnitsConsumed: isSet(object.computeUnitsConsumed) - ? String(object.computeUnitsConsumed) - : undefined, + returnData: isSet(object.returnData) ? ReturnData.fromJSON(object.returnData) : undefined, + returnDataNone: isSet(object.returnDataNone) ? Boolean(object.returnDataNone) : false, + computeUnitsConsumed: isSet(object.computeUnitsConsumed) ? String(object.computeUnitsConsumed) : undefined, }; }, toJSON(message: TransactionStatusMeta): unknown { const obj: any = {}; - message.err !== undefined && - (obj.err = message.err - ? TransactionError.toJSON(message.err) - : undefined); + message.err !== undefined && (obj.err = message.err ? TransactionError.toJSON(message.err) : undefined); message.fee !== undefined && (obj.fee = message.fee); if (message.preBalances) { obj.preBalances = message.preBalances.map((e) => e); @@ -1304,39 +1129,29 @@ export const TransactionStatusMeta = { obj.postBalances = []; } if (message.innerInstructions) { - obj.innerInstructions = message.innerInstructions.map((e) => - e ? InnerInstructions.toJSON(e) : undefined - ); + obj.innerInstructions = message.innerInstructions.map((e) => e ? InnerInstructions.toJSON(e) : undefined); } else { obj.innerInstructions = []; } - message.innerInstructionsNone !== undefined && - (obj.innerInstructionsNone = message.innerInstructionsNone); + message.innerInstructionsNone !== undefined && (obj.innerInstructionsNone = message.innerInstructionsNone); if (message.logMessages) { obj.logMessages = message.logMessages.map((e) => e); } else { obj.logMessages = []; } - message.logMessagesNone !== undefined && - (obj.logMessagesNone = message.logMessagesNone); + message.logMessagesNone !== undefined && (obj.logMessagesNone = message.logMessagesNone); if (message.preTokenBalances) { - obj.preTokenBalances = message.preTokenBalances.map((e) => - e ? TokenBalance.toJSON(e) : undefined - ); + obj.preTokenBalances = message.preTokenBalances.map((e) => e ? TokenBalance.toJSON(e) : undefined); } else { obj.preTokenBalances = []; } if (message.postTokenBalances) { - obj.postTokenBalances = message.postTokenBalances.map((e) => - e ? TokenBalance.toJSON(e) : undefined - ); + obj.postTokenBalances = message.postTokenBalances.map((e) => e ? TokenBalance.toJSON(e) : undefined); } else { obj.postTokenBalances = []; } if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? Reward.toJSON(e) : undefined - ); + obj.rewards = message.rewards.map((e) => e ? Reward.toJSON(e) : undefined); } else { obj.rewards = []; } @@ -1355,52 +1170,36 @@ export const TransactionStatusMeta = { obj.loadedReadonlyAddresses = []; } message.returnData !== undefined && - (obj.returnData = message.returnData - ? ReturnData.toJSON(message.returnData) - : undefined); - message.returnDataNone !== undefined && - (obj.returnDataNone = message.returnDataNone); - message.computeUnitsConsumed !== undefined && - (obj.computeUnitsConsumed = message.computeUnitsConsumed); + (obj.returnData = message.returnData ? ReturnData.toJSON(message.returnData) : undefined); + message.returnDataNone !== undefined && (obj.returnDataNone = message.returnDataNone); + message.computeUnitsConsumed !== undefined && (obj.computeUnitsConsumed = message.computeUnitsConsumed); return obj; }, - create, I>>( - base?: I - ): TransactionStatusMeta { + create, I>>(base?: I): TransactionStatusMeta { return TransactionStatusMeta.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): TransactionStatusMeta { + fromPartial, I>>(object: I): TransactionStatusMeta { const message = createBaseTransactionStatusMeta(); - message.err = - object.err !== undefined && object.err !== null - ? TransactionError.fromPartial(object.err) - : undefined; + message.err = (object.err !== undefined && object.err !== null) + ? TransactionError.fromPartial(object.err) + : undefined; message.fee = object.fee ?? "0"; message.preBalances = object.preBalances?.map((e) => e) || []; message.postBalances = object.postBalances?.map((e) => e) || []; - message.innerInstructions = - object.innerInstructions?.map((e) => InnerInstructions.fromPartial(e)) || - []; + message.innerInstructions = object.innerInstructions?.map((e) => InnerInstructions.fromPartial(e)) || []; message.innerInstructionsNone = object.innerInstructionsNone ?? false; message.logMessages = object.logMessages?.map((e) => e) || []; message.logMessagesNone = object.logMessagesNone ?? false; - message.preTokenBalances = - object.preTokenBalances?.map((e) => TokenBalance.fromPartial(e)) || []; - message.postTokenBalances = - object.postTokenBalances?.map((e) => TokenBalance.fromPartial(e)) || []; + message.preTokenBalances = object.preTokenBalances?.map((e) => TokenBalance.fromPartial(e)) || []; + message.postTokenBalances = object.postTokenBalances?.map((e) => TokenBalance.fromPartial(e)) || []; message.rewards = object.rewards?.map((e) => Reward.fromPartial(e)) || []; - message.loadedWritableAddresses = - object.loadedWritableAddresses?.map((e) => e) || []; - message.loadedReadonlyAddresses = - object.loadedReadonlyAddresses?.map((e) => e) || []; - message.returnData = - object.returnData !== undefined && object.returnData !== null - ? ReturnData.fromPartial(object.returnData) - : undefined; + message.loadedWritableAddresses = object.loadedWritableAddresses?.map((e) => e) || []; + message.loadedReadonlyAddresses = object.loadedReadonlyAddresses?.map((e) => e) || []; + message.returnData = (object.returnData !== undefined && object.returnData !== null) + ? ReturnData.fromPartial(object.returnData) + : undefined; message.returnDataNone = object.returnDataNone ?? false; message.computeUnitsConsumed = object.computeUnitsConsumed ?? undefined; return message; @@ -1412,10 +1211,7 @@ function createBaseTransactionError(): TransactionError { } export const TransactionError = { - encode( - message: TransactionError, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: TransactionError, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.err.length !== 0) { writer.uint32(10).bytes(message.err); } @@ -1423,8 +1219,7 @@ export const TransactionError = { }, decode(input: _m0.Reader | Uint8Array, length?: number): TransactionError { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTransactionError(); while (reader.pos < end) { @@ -1447,29 +1242,21 @@ export const TransactionError = { }, fromJSON(object: any): TransactionError { - return { - err: isSet(object.err) ? bytesFromBase64(object.err) : new Uint8Array(0), - }; + return { err: isSet(object.err) ? bytesFromBase64(object.err) : new Uint8Array(0) }; }, toJSON(message: TransactionError): unknown { const obj: any = {}; message.err !== undefined && - (obj.err = base64FromBytes( - message.err !== undefined ? message.err : new Uint8Array(0) - )); + (obj.err = base64FromBytes(message.err !== undefined ? message.err : new Uint8Array(0))); return obj; }, - create, I>>( - base?: I - ): TransactionError { + create, I>>(base?: I): TransactionError { return TransactionError.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): TransactionError { + fromPartial, I>>(object: I): TransactionError { const message = createBaseTransactionError(); message.err = object.err ?? new Uint8Array(0); return message; @@ -1481,10 +1268,7 @@ function createBaseInnerInstructions(): InnerInstructions { } export const InnerInstructions = { - encode( - message: InnerInstructions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: InnerInstructions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.index !== 0) { writer.uint32(8).uint32(message.index); } @@ -1495,8 +1279,7 @@ export const InnerInstructions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): InnerInstructions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInnerInstructions(); while (reader.pos < end) { @@ -1514,9 +1297,7 @@ export const InnerInstructions = { break; } - message.instructions.push( - InnerInstruction.decode(reader, reader.uint32()) - ); + message.instructions.push(InnerInstruction.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1540,46 +1321,31 @@ export const InnerInstructions = { const obj: any = {}; message.index !== undefined && (obj.index = Math.round(message.index)); if (message.instructions) { - obj.instructions = message.instructions.map((e) => - e ? InnerInstruction.toJSON(e) : undefined - ); + obj.instructions = message.instructions.map((e) => e ? InnerInstruction.toJSON(e) : undefined); } else { obj.instructions = []; } return obj; }, - create, I>>( - base?: I - ): InnerInstructions { + create, I>>(base?: I): InnerInstructions { return InnerInstructions.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): InnerInstructions { + fromPartial, I>>(object: I): InnerInstructions { const message = createBaseInnerInstructions(); message.index = object.index ?? 0; - message.instructions = - object.instructions?.map((e) => InnerInstruction.fromPartial(e)) || []; + message.instructions = object.instructions?.map((e) => InnerInstruction.fromPartial(e)) || []; return message; }, }; function createBaseInnerInstruction(): InnerInstruction { - return { - programIdIndex: 0, - accounts: new Uint8Array(0), - data: new Uint8Array(0), - stackHeight: undefined, - }; + return { programIdIndex: 0, accounts: new Uint8Array(0), data: new Uint8Array(0), stackHeight: undefined }; } export const InnerInstruction = { - encode( - message: InnerInstruction, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: InnerInstruction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.programIdIndex !== 0) { writer.uint32(8).uint32(message.programIdIndex); } @@ -1596,8 +1362,7 @@ export const InnerInstruction = { }, decode(input: _m0.Reader | Uint8Array, length?: number): InnerInstruction { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInnerInstruction(); while (reader.pos < end) { @@ -1642,47 +1407,29 @@ export const InnerInstruction = { fromJSON(object: any): InnerInstruction { return { - programIdIndex: isSet(object.programIdIndex) - ? Number(object.programIdIndex) - : 0, - accounts: isSet(object.accounts) - ? bytesFromBase64(object.accounts) - : new Uint8Array(0), - data: isSet(object.data) - ? bytesFromBase64(object.data) - : new Uint8Array(0), - stackHeight: isSet(object.stackHeight) - ? Number(object.stackHeight) - : undefined, + programIdIndex: isSet(object.programIdIndex) ? Number(object.programIdIndex) : 0, + accounts: isSet(object.accounts) ? bytesFromBase64(object.accounts) : new Uint8Array(0), + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), + stackHeight: isSet(object.stackHeight) ? Number(object.stackHeight) : undefined, }; }, toJSON(message: InnerInstruction): unknown { const obj: any = {}; - message.programIdIndex !== undefined && - (obj.programIdIndex = Math.round(message.programIdIndex)); + message.programIdIndex !== undefined && (obj.programIdIndex = Math.round(message.programIdIndex)); message.accounts !== undefined && - (obj.accounts = base64FromBytes( - message.accounts !== undefined ? message.accounts : new Uint8Array(0) - )); + (obj.accounts = base64FromBytes(message.accounts !== undefined ? message.accounts : new Uint8Array(0))); message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array(0) - )); - message.stackHeight !== undefined && - (obj.stackHeight = Math.round(message.stackHeight)); + (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array(0))); + message.stackHeight !== undefined && (obj.stackHeight = Math.round(message.stackHeight)); return obj; }, - create, I>>( - base?: I - ): InnerInstruction { + create, I>>(base?: I): InnerInstruction { return InnerInstruction.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): InnerInstruction { + fromPartial, I>>(object: I): InnerInstruction { const message = createBaseInnerInstruction(); message.programIdIndex = object.programIdIndex ?? 0; message.accounts = object.accounts ?? new Uint8Array(0); @@ -1693,18 +1440,11 @@ export const InnerInstruction = { }; function createBaseCompiledInstruction(): CompiledInstruction { - return { - programIdIndex: 0, - accounts: new Uint8Array(0), - data: new Uint8Array(0), - }; + return { programIdIndex: 0, accounts: new Uint8Array(0), data: new Uint8Array(0) }; } export const CompiledInstruction = { - encode( - message: CompiledInstruction, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CompiledInstruction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.programIdIndex !== 0) { writer.uint32(8).uint32(message.programIdIndex); } @@ -1718,8 +1458,7 @@ export const CompiledInstruction = { }, decode(input: _m0.Reader | Uint8Array, length?: number): CompiledInstruction { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCompiledInstruction(); while (reader.pos < end) { @@ -1757,42 +1496,27 @@ export const CompiledInstruction = { fromJSON(object: any): CompiledInstruction { return { - programIdIndex: isSet(object.programIdIndex) - ? Number(object.programIdIndex) - : 0, - accounts: isSet(object.accounts) - ? bytesFromBase64(object.accounts) - : new Uint8Array(0), - data: isSet(object.data) - ? bytesFromBase64(object.data) - : new Uint8Array(0), + programIdIndex: isSet(object.programIdIndex) ? Number(object.programIdIndex) : 0, + accounts: isSet(object.accounts) ? bytesFromBase64(object.accounts) : new Uint8Array(0), + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), }; }, toJSON(message: CompiledInstruction): unknown { const obj: any = {}; - message.programIdIndex !== undefined && - (obj.programIdIndex = Math.round(message.programIdIndex)); + message.programIdIndex !== undefined && (obj.programIdIndex = Math.round(message.programIdIndex)); message.accounts !== undefined && - (obj.accounts = base64FromBytes( - message.accounts !== undefined ? message.accounts : new Uint8Array(0) - )); + (obj.accounts = base64FromBytes(message.accounts !== undefined ? message.accounts : new Uint8Array(0))); message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array(0) - )); + (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array(0))); return obj; }, - create, I>>( - base?: I - ): CompiledInstruction { + create, I>>(base?: I): CompiledInstruction { return CompiledInstruction.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): CompiledInstruction { + fromPartial, I>>(object: I): CompiledInstruction { const message = createBaseCompiledInstruction(); message.programIdIndex = object.programIdIndex ?? 0; message.accounts = object.accounts ?? new Uint8Array(0); @@ -1802,20 +1526,11 @@ export const CompiledInstruction = { }; function createBaseTokenBalance(): TokenBalance { - return { - accountIndex: 0, - mint: "", - uiTokenAmount: undefined, - owner: "", - programId: "", - }; + return { accountIndex: 0, mint: "", uiTokenAmount: undefined, owner: "", programId: "" }; } export const TokenBalance = { - encode( - message: TokenBalance, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: TokenBalance, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.accountIndex !== 0) { writer.uint32(8).uint32(message.accountIndex); } @@ -1823,10 +1538,7 @@ export const TokenBalance = { writer.uint32(18).string(message.mint); } if (message.uiTokenAmount !== undefined) { - UiTokenAmount.encode( - message.uiTokenAmount, - writer.uint32(26).fork() - ).ldelim(); + UiTokenAmount.encode(message.uiTokenAmount, writer.uint32(26).fork()).ldelim(); } if (message.owner !== "") { writer.uint32(34).string(message.owner); @@ -1838,8 +1550,7 @@ export const TokenBalance = { }, decode(input: _m0.Reader | Uint8Array, length?: number): TokenBalance { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTokenBalance(); while (reader.pos < end) { @@ -1891,13 +1602,9 @@ export const TokenBalance = { fromJSON(object: any): TokenBalance { return { - accountIndex: isSet(object.accountIndex) - ? Number(object.accountIndex) - : 0, + accountIndex: isSet(object.accountIndex) ? Number(object.accountIndex) : 0, mint: isSet(object.mint) ? String(object.mint) : "", - uiTokenAmount: isSet(object.uiTokenAmount) - ? UiTokenAmount.fromJSON(object.uiTokenAmount) - : undefined, + uiTokenAmount: isSet(object.uiTokenAmount) ? UiTokenAmount.fromJSON(object.uiTokenAmount) : undefined, owner: isSet(object.owner) ? String(object.owner) : "", programId: isSet(object.programId) ? String(object.programId) : "", }; @@ -1905,34 +1612,26 @@ export const TokenBalance = { toJSON(message: TokenBalance): unknown { const obj: any = {}; - message.accountIndex !== undefined && - (obj.accountIndex = Math.round(message.accountIndex)); + message.accountIndex !== undefined && (obj.accountIndex = Math.round(message.accountIndex)); message.mint !== undefined && (obj.mint = message.mint); message.uiTokenAmount !== undefined && - (obj.uiTokenAmount = message.uiTokenAmount - ? UiTokenAmount.toJSON(message.uiTokenAmount) - : undefined); + (obj.uiTokenAmount = message.uiTokenAmount ? UiTokenAmount.toJSON(message.uiTokenAmount) : undefined); message.owner !== undefined && (obj.owner = message.owner); message.programId !== undefined && (obj.programId = message.programId); return obj; }, - create, I>>( - base?: I - ): TokenBalance { + create, I>>(base?: I): TokenBalance { return TokenBalance.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): TokenBalance { + fromPartial, I>>(object: I): TokenBalance { const message = createBaseTokenBalance(); message.accountIndex = object.accountIndex ?? 0; message.mint = object.mint ?? ""; - message.uiTokenAmount = - object.uiTokenAmount !== undefined && object.uiTokenAmount !== null - ? UiTokenAmount.fromPartial(object.uiTokenAmount) - : undefined; + message.uiTokenAmount = (object.uiTokenAmount !== undefined && object.uiTokenAmount !== null) + ? UiTokenAmount.fromPartial(object.uiTokenAmount) + : undefined; message.owner = object.owner ?? ""; message.programId = object.programId ?? ""; return message; @@ -1944,10 +1643,7 @@ function createBaseUiTokenAmount(): UiTokenAmount { } export const UiTokenAmount = { - encode( - message: UiTokenAmount, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: UiTokenAmount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.uiAmount !== 0) { writer.uint32(9).double(message.uiAmount); } @@ -1964,8 +1660,7 @@ export const UiTokenAmount = { }, decode(input: _m0.Reader | Uint8Array, length?: number): UiTokenAmount { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUiTokenAmount(); while (reader.pos < end) { @@ -2013,32 +1708,24 @@ export const UiTokenAmount = { uiAmount: isSet(object.uiAmount) ? Number(object.uiAmount) : 0, decimals: isSet(object.decimals) ? Number(object.decimals) : 0, amount: isSet(object.amount) ? String(object.amount) : "", - uiAmountString: isSet(object.uiAmountString) - ? String(object.uiAmountString) - : "", + uiAmountString: isSet(object.uiAmountString) ? String(object.uiAmountString) : "", }; }, toJSON(message: UiTokenAmount): unknown { const obj: any = {}; message.uiAmount !== undefined && (obj.uiAmount = message.uiAmount); - message.decimals !== undefined && - (obj.decimals = Math.round(message.decimals)); + message.decimals !== undefined && (obj.decimals = Math.round(message.decimals)); message.amount !== undefined && (obj.amount = message.amount); - message.uiAmountString !== undefined && - (obj.uiAmountString = message.uiAmountString); + message.uiAmountString !== undefined && (obj.uiAmountString = message.uiAmountString); return obj; }, - create, I>>( - base?: I - ): UiTokenAmount { + create, I>>(base?: I): UiTokenAmount { return UiTokenAmount.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): UiTokenAmount { + fromPartial, I>>(object: I): UiTokenAmount { const message = createBaseUiTokenAmount(); message.uiAmount = object.uiAmount ?? 0; message.decimals = object.decimals ?? 0; @@ -2053,10 +1740,7 @@ function createBaseReturnData(): ReturnData { } export const ReturnData = { - encode( - message: ReturnData, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ReturnData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.programId.length !== 0) { writer.uint32(10).bytes(message.programId); } @@ -2067,8 +1751,7 @@ export const ReturnData = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ReturnData { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseReturnData(); while (reader.pos < end) { @@ -2099,25 +1782,17 @@ export const ReturnData = { fromJSON(object: any): ReturnData { return { - programId: isSet(object.programId) - ? bytesFromBase64(object.programId) - : new Uint8Array(0), - data: isSet(object.data) - ? bytesFromBase64(object.data) - : new Uint8Array(0), + programId: isSet(object.programId) ? bytesFromBase64(object.programId) : new Uint8Array(0), + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), }; }, toJSON(message: ReturnData): unknown { const obj: any = {}; message.programId !== undefined && - (obj.programId = base64FromBytes( - message.programId !== undefined ? message.programId : new Uint8Array(0) - )); + (obj.programId = base64FromBytes(message.programId !== undefined ? message.programId : new Uint8Array(0))); message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array(0) - )); + (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array(0))); return obj; }, @@ -2125,9 +1800,7 @@ export const ReturnData = { return ReturnData.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): ReturnData { + fromPartial, I>>(object: I): ReturnData { const message = createBaseReturnData(); message.programId = object.programId ?? new Uint8Array(0); message.data = object.data ?? new Uint8Array(0); @@ -2136,20 +1809,11 @@ export const ReturnData = { }; function createBaseReward(): Reward { - return { - pubkey: "", - lamports: "0", - postBalance: "0", - rewardType: 0, - commission: "", - }; + return { pubkey: "", lamports: "0", postBalance: "0", rewardType: 0, commission: "" }; } export const Reward = { - encode( - message: Reward, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Reward, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pubkey !== "") { writer.uint32(10).string(message.pubkey); } @@ -2169,8 +1833,7 @@ export const Reward = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Reward { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseReward(); while (reader.pos < end) { @@ -2225,9 +1888,7 @@ export const Reward = { pubkey: isSet(object.pubkey) ? String(object.pubkey) : "", lamports: isSet(object.lamports) ? String(object.lamports) : "0", postBalance: isSet(object.postBalance) ? String(object.postBalance) : "0", - rewardType: isSet(object.rewardType) - ? rewardTypeFromJSON(object.rewardType) - : 0, + rewardType: isSet(object.rewardType) ? rewardTypeFromJSON(object.rewardType) : 0, commission: isSet(object.commission) ? String(object.commission) : "", }; }, @@ -2236,10 +1897,8 @@ export const Reward = { const obj: any = {}; message.pubkey !== undefined && (obj.pubkey = message.pubkey); message.lamports !== undefined && (obj.lamports = message.lamports); - message.postBalance !== undefined && - (obj.postBalance = message.postBalance); - message.rewardType !== undefined && - (obj.rewardType = rewardTypeToJSON(message.rewardType)); + message.postBalance !== undefined && (obj.postBalance = message.postBalance); + message.rewardType !== undefined && (obj.rewardType = rewardTypeToJSON(message.rewardType)); message.commission !== undefined && (obj.commission = message.commission); return obj; }, @@ -2260,23 +1919,22 @@ export const Reward = { }; function createBaseRewards(): Rewards { - return { rewards: [] }; + return { rewards: [], numPartitions: undefined }; } export const Rewards = { - encode( - message: Rewards, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Rewards, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.rewards) { Reward.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.numPartitions !== undefined) { + NumPartitions.encode(message.numPartitions, writer.uint32(18).fork()).ldelim(); + } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Rewards { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRewards(); while (reader.pos < end) { @@ -2289,6 +1947,13 @@ export const Rewards = { message.rewards.push(Reward.decode(reader, reader.uint32())); continue; + case 2: + if (tag !== 18) { + break; + } + + message.numPartitions = NumPartitions.decode(reader, reader.uint32()); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -2300,21 +1965,20 @@ export const Rewards = { fromJSON(object: any): Rewards { return { - rewards: Array.isArray(object?.rewards) - ? object.rewards.map((e: any) => Reward.fromJSON(e)) - : [], + rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => Reward.fromJSON(e)) : [], + numPartitions: isSet(object.numPartitions) ? NumPartitions.fromJSON(object.numPartitions) : undefined, }; }, toJSON(message: Rewards): unknown { const obj: any = {}; if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? Reward.toJSON(e) : undefined - ); + obj.rewards = message.rewards.map((e) => e ? Reward.toJSON(e) : undefined); } else { obj.rewards = []; } + message.numPartitions !== undefined && + (obj.numPartitions = message.numPartitions ? NumPartitions.toJSON(message.numPartitions) : undefined); return obj; }, @@ -2325,6 +1989,9 @@ export const Rewards = { fromPartial, I>>(object: I): Rewards { const message = createBaseRewards(); message.rewards = object.rewards?.map((e) => Reward.fromPartial(e)) || []; + message.numPartitions = (object.numPartitions !== undefined && object.numPartitions !== null) + ? NumPartitions.fromPartial(object.numPartitions) + : undefined; return message; }, }; @@ -2334,10 +2001,7 @@ function createBaseUnixTimestamp(): UnixTimestamp { } export const UnixTimestamp = { - encode( - message: UnixTimestamp, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: UnixTimestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.timestamp !== "0") { writer.uint32(8).int64(message.timestamp); } @@ -2345,8 +2009,7 @@ export const UnixTimestamp = { }, decode(input: _m0.Reader | Uint8Array, length?: number): UnixTimestamp { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUnixTimestamp(); while (reader.pos < end) { @@ -2369,9 +2032,7 @@ export const UnixTimestamp = { }, fromJSON(object: any): UnixTimestamp { - return { - timestamp: isSet(object.timestamp) ? String(object.timestamp) : "0", - }; + return { timestamp: isSet(object.timestamp) ? String(object.timestamp) : "0" }; }, toJSON(message: UnixTimestamp): unknown { @@ -2380,15 +2041,11 @@ export const UnixTimestamp = { return obj; }, - create, I>>( - base?: I - ): UnixTimestamp { + create, I>>(base?: I): UnixTimestamp { return UnixTimestamp.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): UnixTimestamp { + fromPartial, I>>(object: I): UnixTimestamp { const message = createBaseUnixTimestamp(); message.timestamp = object.timestamp ?? "0"; return message; @@ -2400,10 +2057,7 @@ function createBaseBlockHeight(): BlockHeight { } export const BlockHeight = { - encode( - message: BlockHeight, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: BlockHeight, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.blockHeight !== "0") { writer.uint32(8).uint64(message.blockHeight); } @@ -2411,8 +2065,7 @@ export const BlockHeight = { }, decode(input: _m0.Reader | Uint8Array, length?: number): BlockHeight { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBlockHeight(); while (reader.pos < end) { @@ -2435,15 +2088,12 @@ export const BlockHeight = { }, fromJSON(object: any): BlockHeight { - return { - blockHeight: isSet(object.blockHeight) ? String(object.blockHeight) : "0", - }; + return { blockHeight: isSet(object.blockHeight) ? String(object.blockHeight) : "0" }; }, toJSON(message: BlockHeight): unknown { const obj: any = {}; - message.blockHeight !== undefined && - (obj.blockHeight = message.blockHeight); + message.blockHeight !== undefined && (obj.blockHeight = message.blockHeight); return obj; }, @@ -2451,15 +2101,69 @@ export const BlockHeight = { return BlockHeight.fromPartial(base ?? {}); }, - fromPartial, I>>( - object: I - ): BlockHeight { + fromPartial, I>>(object: I): BlockHeight { const message = createBaseBlockHeight(); message.blockHeight = object.blockHeight ?? "0"; return message; }, }; +function createBaseNumPartitions(): NumPartitions { + return { numPartitions: "0" }; +} + +export const NumPartitions = { + encode(message: NumPartitions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.numPartitions !== "0") { + writer.uint32(8).uint64(message.numPartitions); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): NumPartitions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseNumPartitions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.numPartitions = longToString(reader.uint64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): NumPartitions { + return { numPartitions: isSet(object.numPartitions) ? String(object.numPartitions) : "0" }; + }, + + toJSON(message: NumPartitions): unknown { + const obj: any = {}; + message.numPartitions !== undefined && (obj.numPartitions = message.numPartitions); + return obj; + }, + + create, I>>(base?: I): NumPartitions { + return NumPartitions.fromPartial(base ?? {}); + }, + + fromPartial, I>>(object: I): NumPartitions { + const message = createBaseNumPartitions(); + message.numPartitions = object.numPartitions ?? "0"; + return message; + }, +}; + declare var self: any | undefined; declare var window: any | undefined; declare var global: any | undefined; @@ -2504,31 +2208,16 @@ function base64FromBytes(arr: Uint8Array): string { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } : Partial; type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { - [K in Exclude>]: never; - }; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; function longToString(long: Long) { return long.toString();